Consider the following class: Bifndef BIDCOLLECTION H #define BIDCOLLECTION,H #i
ID: 3906708 • Letter: C
Question
Consider the following class: Bifndef BIDCOLLECTION H #define BIDCOLLECTION,H #include "bids.h" class BidCollection ( int MaxSize; int size Bid elements;/array of bids public Create a collection capable of holding the indicated number of bids BidCollection (int MaxBids 1000) -BidCollection 0: // Access to attributes int getMaxSize) const (return MaxSize:) int getsize) const (return size: Il Access to individual elements const Bid& get(int index) const freturn elementslindex)) l Collection operations void addinTimeOrder (const Bid& value) IAdds this bid into a position such that /I all bids are ordered by the time the bid was placed /Pre: getSize0Explanation / Answer
Minimum number of test assertions we should expect to provide is 2:-
Assertion1:- Check if getSize() is smaller in value compared to getMaxSize()
Assertion2:- The index that is passed to remove() should lie between 0 and getSize() [ie size value]
Please let me know in case of any clarifications required. Thanks!
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.