Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Specific Requirements ( c + + ) ItemType Class This class is named ItemType and will hold the actual data being managed, which is a
Specific Requirements c
ItemType Class
This class is named "ItemType" and will hold the actual data being managed, which is a car description and VIN. There will be NO output statements made by this class except in the PrintInfo function, including constructors and destructors.
Member data:
string description
long long integer VIN this item will be the key for comparison
Functions
Default Constructor : default values "Undefined car" and Default objects will only be created for the purposes of indicating that the requested item does not exist.
Nondefault Constructor that takes in string and integer values and sets member variable data to them. This is the only way a "real" or "valid" ItemType will be created.
Destructor: Have one, but no data gets allocated in this class, so there is nothing to put in it No output statement please.
Other public functions to provide:
tableFunction name,Return type,ArgumentsDescriptionComparetableenum orstring yourchoiceItemTypetableCompares the key value of the ItemTypepointed to by the argument to the keyvalue in the current object and returnsthe string enum result of thatcomparison Values are EQUAL, LESS andGREATER and are with respect to theargument If the argument is greaterthan the member data, return GREATER.GetDatatablelong longintegerString&tableReturns the long long integer vin andpopulates the pass by referenceargument with the descriptionPrintInfovoid,None,tablePrints exactly this:VIN comma space description new line.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started