When the member wants to rent a movie, how can the selection (choice ) be removed from the stack, because top of the stack is the latest release?
Ans. Whenever the member wants to rent the movie, member will provide the movieID and year. You will create another stack (temp stack) and pop out the movie one by one from the movieInventory stack compare it with the required (choice of movie) and if not matched, push it into the temp stack. If the movie is found, it is not pushed into temp stack, but this node is added to the RentedOutList. Then the temp stack is popped and pushed into the movieInventory stack, thus maintaining the original stack of movies in the warehouse.