Professional Documents
Culture Documents
Cs 304
Student ID::
MC200201993
Student Name::
Bushra Saleem
Submitted By::
Sir Shafiq-ur-Rehman
Problem Statement:
Due to Ramadan, your nearby community wants to launch an “Online Grocery Store” so that,
people can purchase groceries from home and able to maintain social distance. This precaution
will allow reducing the movement of people in Ramadan and minimize the spread of disease
COVID-19. The XYZ store will offer various products. The user will be shown a list of products,
which can be selected or deselected from the provided list. The user will need to get registered
to buy Products. At the end of shopping, the customer can double-check all the Products added
into his Cart and verify the total amount before payment. The Store Administrator will manage
Products and assign orders to Delivery Boys.
Draw an Object Model (Class Diagram) for the given scenario showing main objects, their
attributes, functions and relationships.
Objectives:
Solution:
Q1:Extract the Main objects of above system?
2:Products
3:Payment
4:Admin
5:Cash on delivery
6:Order
7:Order
8:Order details
9:Cart
10:category
Q2: 2. Find the necessary attributes and functions that need to be associated with each object?
Answer:
User
Functions: login ID
Customer
Functions: Customer ID
Admin
Product:
Attributes: Product ID, Product Name, Product description , price ,Exp date, mfg date, quantity
Functions: add product, update product, display product, delete product, get product details
Category:
Order details
Attributes; Order ID, product ID, product Name, quantity, total cost, discount
Cart:
Attributes: cart ID, product ID, quantity, date added
Answer:1 ::Association
2::inheritance
3::Aggregation
4::Composition
4. Construct a final comprehensive Class diagram showing all objects and their relationships along
with their attributes and functions
UML diagram::