Basket Challenge
Basket Challenge
Main.java
1 | package com.chung; |
Result
Stock List
door : price 72.95. There are 4 in stock. Value of times : 291.80
bread : price 0.86. There are 10 in stock. Value of times : 8.60
phone : price 96.99. There are 35 in stock. Value of times : 3394.65
towel : price 2.4. There are 80 in stock. Value of times : 192.00
chair : price 62.0. There are 10 in stock. Value of times : 620.00
coffee : price 0.1. There are 3 in stock. Value of times : 0.30
vase : price 8.76. There are 40 in stock. Value of times : 350.40
juice : price 2.5. There are 36 in stock. Value of times : 90.00
Orange : price 0.23. There are 2 in stock. Value of times : 0.46
cup : price 0.5. There are 200 in stock. Value of times : 100.00
Total stock value 5048.209999999999
door
bread
phone
towel
chair
coffee
vase
juice
Orange
cup
Shopping basket Javit contains 1 item
bread : price 0.86. 1 purchased
Total cost 0.86
StockItem.java
1 | package com.chung; |
StockList.java
1 | package com.chung; |
Basket.java
1 | package com.chung; |
(출처 : Udemy Programming masterclass for software developers)