
C
CS
SE
E2
21
12
2:
:
S
SO
OF
FT
TW
WA
AR
RE
E
D
DE
EV
VE
EL
LO
OP
PM
ME
EN
NT
T
M
ME
ET
TH
HO
OD
DO
OL
LO
OG
GI
IE
ES
S
Y
YE
ED
DI
IT
TE
EP
PE
E
U
UN
NI
IV
VE
ER
RS
SI
IT
TY
Y
F
FA
AL
LL
L
2
20
02
23
3
A
AS
SS
SI
IG
GN
NM
ME
EN
NT
T
2
2
ā
ā
D
DU
UE
E
D
DA
AT
TE
E
N
NO
OV
VE
EM
MB
BE
ER
R
6
6TTHH,
,
2
20
02
23
3
Below, you can find the description of your second assignment. Additionally,
you can also find the expected output of this assignment in the Application
Walkthrough section.
As part of your second assignment, you will need to improve your existing
Online Shop Inventory Management System so that users can place a single
order from the Inventory and provide them with the cost of their order.
Accordingly, you would need to create a new class named Order. This class
should contain information about the order, thus, it would need to have the
following fields:
orderID (int): Must be incremented every time an order is placed.
inventory (Inventory): An instance of the Inventory class.
itemName (String): Which item is ordered.
quantity (int): How many items are ordered.
In the Order class, you are also expected to implement the following methods:
ā displayOrderInfo(): This method must be utilized to print the necessary
information about an order.
ā checkStorage(): This method should check if the ordered item is in
Inventory. Only if the item is in inventory should the customer be able to
make the purchase.
ā calculateOrderCost(): Based on the information gathered from the
Inventory class for item price and item name, order cost should be
calculated by multiplying the relative quantity of order with the item
price.