This project is an online shopping system developed in C++. The system allows users to add products to their cart, place orders, and view invoices. The project includes various classes representing users, managers, carriers, and products. It also evaluates the strength of user passwords and calculates invoices based on discount codes.
- Description: Stores date and time information used in the system.
- Members:
int hour
: Hour information.int minute
: Minute information.
- Functions:
ostream& operator<<(ostream& os, const Zaman& dt)
: Outputs theZaman
object to the screen.
- Description: Holds general clothing product information.
- Members:
int index
: Product number.string size
: Product size.string color
: Product color.string category
: Product category.double price
: Product price.
- Functions: Contains various setter and getter functions to set and get product information.
- Description: Stores order information.
- Members:
int order_no
: Order number.double order_price
: Order price.Zaman order_start
: Order start time.Zaman order_delivery
: Order delivery time.
- Functions: Contains various setter and getter functions to set and get order information.
- Dress, Tshirt, Pants, Shirt, Skirt, Shoes: Derived from the
Clothes
class, representing different types of clothing. Each has default and parameterized constructors.
- Description: Holds personal information.
- Members:
string name_surname
: Person's name and surname.string phone_no
: Person's phone number.
- Description: Holds user information and manages cart and orders.
- Members:
string username
,email
,district_address
,password
,discount_code
,birthdate
: User information.vector<Clothes> cart
: Products in the user's cart.vector<Siparis> orders
: Orders placed by the user.vector<vector<Siparis>> orderHistory
: Orders organized by their time.
- Functions: Contains various setter and getter functions for user information.
- Description: Holds manager information.
- Members:
string password
: Manager's password.
- Description: Holds carrier information and delivery details.
- Members:
Zaman delivery_end
: Delivery end time.int order_number
: Order number assigned to the carrier.
- Description: Stores invoice information.
- Members:
int order_no
: Order number.string username
: User's name.
- Functions: Contains setter and getter functions for invoice information.
- Description: Converts a character array to a string.
- Parameters:
char* a
: Character array.int size
: Size of the array.
- Description: Evaluates and prints the strength of a password.
- Parameters:
string& input
: Password.
- Description: Calculates the total amount of orders and applies discounts.
- Parameters:
vector<Siparis> orders
: Orders.User& user
: User information.
- Description: Calculates the total amount of items in the cart.
- Parameters:
vector<Clothes> basket
: Cart.User user
: User information.
- Description: Displays the user's invoice and order details.
- Parameters:
User user
: User information.
- Description: Displays the user's cart items and cart total.
- Parameters:
User user
: User information.
-
Compilation
Compile the project using a C++ compiler:
g++ -o shopping_system main.cpp
-
Execution
Run the compiled application:
./shopping_system
-
User Interface
- When the application starts, users can add products to their cart, place orders, and view invoices.