Having run into trouble with current online auctions and buyers that win auctions and then back out, you decide to open a new enterprise that has the bidders deposit funds before they may bid onany item. If they win an auction, the amount they bid is immediately (that second!) deducted from their account. (The problem of sellers that don't deliver the items will be left for another day.)
You must write a program to implement the rules of this auction. You will be auctioning off a number of items, each of which will have a reserve price that must be met. Each of your bidders will deposit funds with you, and you must match these funds with items they successfully bid for.You will write a program that tracks the auctions during a single day and outputs the results ofeach auction.
Auction Rules
You are guaranteed:
- No two items will have the same end time.
- No two bids will have the same bid time.
- No price, bid, or account balance will be negative.
Bidder numbers and item numbers are unique within each category, but a bidder may have the same number as an item. Bidder and item numbers are not necessarily assigned sequentially.
An auction is won by the highest bid that:
- arrives no later than the second the auction ends.
- is greater than or equal to the minimum price for the item
- has at least the bid amount remaining in the bidder's account at the instant the auction ends.