Docsity

What the Hell for Kiddos 2, Slides of Mathematics

Toggle sidebar
bg1
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.
pf3
pf4
pf5

Partial preview of the text

Download What the Hell for Kiddos 2 and more Slides Mathematics in PDF only on Docsity!

CSCSEE2 2112 2:: SOSOFFTTWWAARREE DDEEVVEELLOOPPMMEENNTT

MMEETTHHOODDOOLLOOGGIIEESS

YE YEDDIITTEEPPEE UNUNIIVVEERRSSIITTYY

FA FALLLL 22002233

AS ASSSIIGGNNMMEENNTT 22 – – D UDUEE D ADATTEE NONOVVEEMMBBEERR 66 TTHH^ ,, 20202233

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.

Keep in mind, users can and should be able to create only one order in the

scope of this assignment. You should also improve your existing menu so that

the user is able to place orders. Also, from now on, you must implement your

menu loops or cases using enums.

INVENTORY MENU:

1. Add a New Item

2. Display all Items

3. Display the Total Number of Items

4. Calculate the Total Worth of the Inventory

CUSTOMER MENU:

5. Add an order

6. Calculate order cost

7. Exit

PS: As this is a follow up to your existing assignment (#1) your inventory data

must be still stored in C-style arrays. Test your program thoroughly to ensure

it meets the requirements of the assignment.

Application Walkthrough INVENTORY MENU:

  1. Add a New Item
  2. Display all Items
  3. Display the Total Number of Items
  4. Calculate the Total Worth of the Inventory CUSTOMER MENU:
  5. Add an Order
  6. Calculate Order Cost
  7. Exit Enter your choice: 1
  1. Display the Total Number of Items
  2. Calculate the Total Worth of the Inventory CUSTOMER MENU:
  3. Add an Order
  4. Calculate Order Cost
  5. Exit Enter your choice: 3 Total number of items: 2 INVENTORY MENU:
  6. Add a New Item
  7. Display all Items
  8. Display the Total Number of Items
  9. Calculate the Total Worth of the Inventory CUSTOMER MENU:
  10. Add an Order
  11. Calculate Order Cost
  12. Exit Enter your choice: 5 Enter the item name you want to order: AirPods Pro Enter the quantity: 3 Item not found in inventory. Order cannot be placed. INVENTORY MENU:
  13. Add a New Item
  14. Display all Items
  15. Display the Total Number of Items
  16. Calculate the Total Worth of the Inventory CUSTOMER MENU:
  17. Add an Order
  18. Calculate Order Cost
  19. Exit Enter your choice: 5 Enter the item name you want to order: Iphone 15 Pro Enter the quantity: 1 Order ID: 2

Item Name: Iphone 15 Pro Quantity: 1 INVENTORY MENU:

  1. Add a New Item
  2. Display all Items
  3. Display the Total Number of Items
  4. Calculate the Total Worth of the Inventory CUSTOMER MENU:
  5. Add an Order
  6. Calculate Order Cost
  7. Exit Enter your choice: 6 Order cost for 1 Iphone 15 Pro is: $999. Exiting... Goodbye! Process finished with exit code 0

Submit your assignment folder in a zip file [class files will not be marked], which has your

student number as name, through the YULEARN (https://yulearn.yeditepe.edu.tr) latest

by the end of Monday, November 6

t h