Project Slides
Project Slides
SHOPPING CART
GROUP MEMBERS
Muhammad Ali
- 233510
Muhammad Hassan -
233516
Muhammad Haroon -
233504
INTRODUCTION
PRODUCT CART
MANAGEMENT VISUALIZATION
Users can effortlessly The cart displays its
add, remove, and contents in a user-
update product friendly and
quantities in the cart, organized manner,
providing a flexible with images,
and dynamic descriptions, and
shopping experience. prices visible.
OVERVIEW
COST CHECKOUT
CALCULATION PROCESS
2.View Cart :
Users can view the items
added to the cart, along with subtotal, discount,
sales tax, and total cost.
FEATURES
• Product Recommendations :
• Cart Expiration :
The cart expires after 10
minutes, after which users will need to restart the session.
• Checkout Process :
Users can finalize their
LIBRARIES
using
using System; System.Collections.Generic;
using System.Linq;
LINQ (Language
Integrated Query)
provides a way to query
collections in a more
readable and
expressive manner
using syntax similar to
SQL.
CLASSES
• Class Product :
This class contains details about the
products.
• Class Cart :
This class consists of methods to
add,remove products in cart.
• Class Program :
It initializes a console-based shopping
cart application, displaying a welcome message and setting up a list
FUNCTIONS
User-Defined Buillt-In
• Console.Clear() :
Clears the console
window.
• Console.Title :
Sets the title of the
console window.
• Console.ForegroundColor :
Changes the color of
the text output in the console.
BUILT-IN FUNCTIONS
• Environment.Exit(0) :
Terminates the
current process and returns an exit code to the
operating system.
• Console.WriteLine():
Outputs a line of
text to the console.
• Console.ReadLine():
Reads a line of
BUILT-IN FUNCTIONS
• IsExpired() :
Checks if the cart has
expired based on the current date and time.
• C$"{product.Name}":
Allows for easier and
more readable string formatting.
• int.TryParse():
Attempts to convert a
string representation of a number to its integer
BUILT-IN FUNCTIONS
• DateTime.Now :
Retrieves the current
date and time.
• TimeSpan :
Represents a time
interval.
• Console.ResetColor():
Resets the console text
color to its default, ensuring that subsequent text
USER-DEFINED
FUNCTIONS:
• RemoveProductByIndex():
Subtotal
$150.00
Discounts
-$20.00
Sales Tax
$10.50
Total
$140.50
CONCLUSION