Maintaining Bids
Prerequisites, Goals, and Outcomes
Prerequisites: Students should have mastered the following prerequisite skills.
Knowledge of STL priority_queue - Basic use of the container
C++ Class Specication - Produce C++ class implementations
Goals: This assignment is designed to reinforce the student's understanding and use of the
STL priority_queue.
Outcomes: Students successfully completing this assignment would master the following
outcomes.
Use the STL priority_queue
Produce C++ class implementations given class declarations
Background
A typical online auction system displays the highest bid for each item up for sell. To track
bids, these systems usually require a bidder to be a registered user.
Description
This assessment extends the Auction project to allow registered users to place bids on
advertisements.
To complete this exercise, implement class Bid, update the implementation of class
Advertisement and class Client, and complete the implementation of function
displayBidHistory.
Class Bid
Class Bid models a bid placed on an advertisement. This class contains private data
members to store the email address of the user who placed the bid, the dollar amount of
the bid, the number of items bid on, and the date and time of the bid. The class declaration
includes the following public members.
Default constructor
Initializes the private data members to default values
Four parameter constructor
Accepts parameters for email address, bid amount, quantity, and date
Copy constructor
Makes a copy of a Bid object
Accessors and mutators
Provides access to the data members of the class
- 1
- 2
前往页