Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is a C++ code Write a C++ class (not a class template) called Inventoryltem. Your class should include: - two private data members: id
This is a C++ code
Write a C++ class (not a class template) called Inventoryltem. Your class should include: - two private data members: id (an integer) quantity (an integer) - all member functions should be public. - a default (no argument) constructor that sets id and quantity to zero - an accessor method called getld that has no parameters and returns the value of the id data member. This should be a constant method. - An accessor method called getQuantity that has no parameters and returns the value of the quantity data member. This should be a constant method. - A method called setld that has one integer parameter. This method will store the value of the parameter in the id data member. request). not modified and the method returns false (invalid request). Your class definition should contain only data fields and method prototypes. The implementations for your methods should be outside the class definition. Write you answer in the text box belowStep 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