Determine the different ways the system will be used. This includes main functions the system needs to perform and who will use it.
Main functions
Users
Based on the requirements and use cases, identify the main objects of the system and analyze how they interact and relate to each other...
Warehouse Class
Warehouse Class is the main class where we store our Stock, Order Class
Stock class is the class which handles the database of every item
For each class, define the attributes (data) it will hold and the methods (functions) that operate on the attributes. Ensure they align with the object's responsibilities and adhere to the principle of encapsulation. Write your code in the code editor below.
API
returns a list of item products
Request:
{}
Response:
List of items
[{name: "item1", price:1238, description: "....", title:".."},
{name: "item2", price:1239, description: "....", title:".."},...]
return a list of order sorted by expectedDeliveryDate and then orderedData
Request:
{}
Response:
List of orders
[{orderId: 123212134, item: "item1", quantity: 3,
orderedDate: "13243512", expectedDeliveryDate: "1234567845"},
{orderId: 1232121454, item: "item2", quantity: 3,
orderedDate: "1324352332", expectedDeliveryDate: "12345672435"},....]
return a order
Request:
{orderId: 123212134}
Response:
List of orders
[{orderId: 123212134, item: "item1", quantity: 3,
orderedDate: "13243512", expectedDeliveryDate: "1234567845"}]
return list of orders in shipment process
Request:
{}
Response:
List of orders
[{orderId: 123212134, deliveryId: "#123212134", item: "item1", quantity: 3,
orderedDate: "13243512", expectedDeliveryDate: "1234567845",
currentStatus: "IN_TRANSIT", currentStation: "HOSUR"},
{orderId: 123212135, item: "item2", quantity: 2,
orderedDate: "13243522", expectedDeliveryDate: "1234565845",
currentStatus: "IN_TRANSIT", currentStation: "BANERGATTE"} ...]
return a order in shipment process
Request:
{deliveryId: "#123212134"}
Response:
List of orders
[{orderId: 123212134, deliveryId: "#123212134", item: "item1", quantity: 3,
orderedDate: "13243512", expectedDeliveryDate: "1234567845",
currentStatus: "IN_TRANSIT", currentStation: "HOSUR"}]
Explain design tradeoffs you considered. Check and explain whether your design adheres to SOLID principles. Explain how your design can handle changes in scale and whether it would be easy to extend with new functionalities. Identify areas for future improvement...
Trade offs: Db is the main controller here
Limitation:
SOLID principles trade offs