0% found this document useful (0 votes)
8 views2 pages

Coding Lab1

The document outlines the class structure for an e-commerce system, detailing five main classes: User, Product, Cart, Order, and Payment. Each class has a defined purpose and specific relationships with other classes, such as Users having one Cart and multiple Orders, and Carts containing multiple Products. The relationships are primarily one-to-one or one-to-many, facilitating the shopping and order process.

Uploaded by

markezekiel94
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Coding Lab1

The document outlines the class structure for an e-commerce system, detailing five main classes: User, Product, Cart, Order, and Payment. Each class has a defined purpose and specific relationships with other classes, such as Users having one Cart and multiple Orders, and Carts containing multiple Products. The relationships are primarily one-to-one or one-to-many, facilitating the shopping and order process.

Uploaded by

markezekiel94
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

REPORT

[Link] Class
• Purpose: Represents a user that's planning to shop. Users can browse products,
add items to their cart, and place orders.
• Relationships: One User has one Cart (1-to-1 relationship), A User can place
multiple Orders (1-to-many relationship).

2. Product Class
• Purpose: Represents a product available for purchase.
• Relationships: Multiple products can be added to one cart (many-to one)

3. Cart Class
• Purpose: Represents a shopping cart where users can add or remove products
before checkout.
• Relationships: A Cart belongs to one User (1-to-1 relationship), A Cart contains
multiple Product instances (one-to-many relationship).

4. Order Class
• Purpose: Represents an order placed by a user.
• Relationships: An Order belongs to one User (many-to-1 relationship),

5. Payment Class
• Purpose: Represents the payment made for an order.
• Relationships: A Payment is associated with one Order (1-to-1 relationship).

You might also like