Q1_20250829125623.webp
blue_sky

Q1_20250829125623.webp

  • Media owner blue_sky
  • Ngày thêm
☑Kizspy.me
Class ComputerStore is the main class of the program, containing:
O
An ActionLogStack: manage the working history of the store, such as: buy, ship,
cancel, update price, etc.
。 An OrderBST: manage the order information, such as customer and price.
Students are required to carefully read the provided code segments to fully understand the
relationships between the classes and the functions within each class. The specific task of the test
is to execute the following requirements:
a. f10-3 marks: To complete the requirement fl, students need to fulfill these two
specific tasks: implement the method push() in ActionLogStack and the method insert()
in OrderBST.
⚫ push() follows the principle of Stacks.
.insert() follows these following rules:
■ Orders are inserted based on their orderID (alphabetically comparison)
"
If an order is added with the existed ID, overwrite it with new order.
The expected output used to test your code are as follows:
Action Log Stack: (Action7,Modified) (Action6,Placed) (Action5,Returned)
(Action4,Canceled) (Action3,Shipped) (Action2,Updated) (Action 1,Placed)
Order BST: (Order0,F,2500.0) (Order1,D,3000.0) (Order2,B,200.0) (Order3,E,150.0)
(Order4,C,500.0) (Order6,A,1000.0) (Order9,G,800.0)
Zoom
+100%
Close
Chưa có bình luận nào.

Thông tin

Category
CSD201
Thêm bởi
blue_sky
Ngày thêm
Lượt xem
13,823
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom