Given the project AuctionSystem1 auction system as described in the book on p. 170.
close()
to the Auction class. This should iterate over the
collection of items iterating (using a for-each loop) and printing
print details of all items. Every item on which at least
one bid is considered sold, so look for
Lot objects for which the highest bid field is not None. For lots
with a bidder, the following should be printed in the console:
Lot number: [lot number] - Winner: [name] - Highest Bid: [highest_bid]
For items without a bidder, print the following:
Lot number: [lot number] - No bid
def get_unsold()
.
This method should search the lots field and store the lots that are not sold in a new
local list variable. What you are looking for are lot objects for which the field
highest_bid is None. At the end of the method, return the list of
unsold lots. If all lots are sold, the method returns None.remove()
to the Auction class with the following
header def remove(number:int)
. The method removes the lot with
the given lot number and returns the lot that was removed. The method returns
None if no lot was removed because it does not exist.