You will write a program to keep up with bids at an auction. You will have a class “Node” to store the bid amount. You will have a class “LinkedStack” to implement the stack as a linked list. Put your...


You will write a program to keep up with bids at an auction.

You will have a class “Node” to store the bid amount.
You will have a class “LinkedStack” to implement the stack as a linked list.
Put your class definition in a header file and the implementation of the methods in a .cpp file.


Your program will ask the user for a file name, open a file containing a string (the item being auctioned) followed by a series of integer bid amounts. You do not know how many bids there are so you must read until you reach the end of the file. Make sure you check to see if the file opened properly before you try to process it.

Read each bid from the file. If a bid is larger than the last one, you will put it on the stack. Once all bids have been processed your program will display the item and the winning bid. There is no need for a user interface that does more than ask for the file name, displaying an appropriate message if the file does not exist, and displaying the item with winning bid.



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here