Question: Imagine a program for a bookstore to organize customer orders. An order ID is assigned by the marketplace ( like amazon ) as soon as

Imagine a program for a bookstore to organize customer orders. An order ID is assigned by the marketplace (like amazon) as soon as the user selects the book. However, bookstore doesnt get order details until the payment goes through. This means that order numbers can arrive out of sequence. Order number 5 may arrive after order number 6.
The program must ask and enable the user to do the following operations:
1. manually add a book order (new order)
2. manually remove a book order (fulfill order)
3. print an In-Order list of book names by order ID.(In-order traversal)
4. find the name of the book for a specific order number. (search)
5. find the oldest book order (next book order to fill)
6. find the latest book order. (last book order to fill)
Additionally, program should print the number of nodes and height of the AVL tree after every operation.
What are test cases and exceptions/limitations implemented for this program?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!