Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Assignment #1

A shopping lists. This could be done as a linked list of nodes where each node has
its own child linked list of store options (Linked list of linked lists) as follows:

Develop a program to simulate a mall consists of several stores, each store


contains a group of items. Using the system you can add items to the shopping
cart, remove them, edit their data, and confirm purchase according to the
following rules:
1- Every store specializes in a specific type of items that is not found in any
other store.
2- The item in each store is an object with the following attributes:
a- Name: String
b- Id: String
c- Quantity: integer
d- Price: integer
e- StoreNumber: integer (store index in the Main list)
3- The addition of a new item to any store should be ordered by name.
4- The deletion process will be performed based on the ID of the item.
5- The customer could search for any item in any store by entering the name
and ID of that item, the system should display the store ID in which the
item found and the available amount of that item.
6- Purchase process:
a- Store cart:
- The system should have a cart to store probable items to purchase
(cart list). When adding an item to the cart list its quantity should be
decreased from the store list based on the quantity ordered from the
customer (for this task the quantity of the item should be checked).
- The items in the cart could be purchased or returned to the store. If
the customer returned any item, it should be returned to the correct
store, the items at that store should remain in the correct order, and
the quantity of that item should be increased.
b- Final step of the purchase process is to confirm the process. By
confirming the purchase, items should be removed from the cart and
the total price should be calculated and displayed to the customer.
The whole system is shown in the following class diagram

You might also like