Answered step by step
Verified Expert Solution
Link Copied!

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 0. Default objects will only be created for the purposes of indicating that the requested item does not exist.
Non-default 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:
\table[[Function name,Return type,Argument(s),Description],[Compare(),\table[[enum or],[string - your],[choice]],ItemType*,\table[[Compares the key value of the ItemType],[pointed to by the argument to the key],[value in the current object and returns],[the string / enum result of that],[comparison. Values are EQUAL, LESS and],[GREATER and are with respect to the],[argument. If the argument is greater],[than the member data, return GREATER.]]],[GetData(),\table[[long long],[integer]],String&,\table[[Returns the long long integer vin and],[populates the pass by reference],[argument with the description]]],[PrintInfo(),void,None,\table[[Prints exactly this:],[VIN comma space description new line.]]]]
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mysql Examples Explanations Explain Examples

Authors: Harry Baker ,Ray Yao

1st Edition

B0CQK9RN2J, 979-8872176237

More Books

Students also viewed these Databases questions