Question: The class variables, which represent a single product sold by the store, should include the following data members: The product ID number integer; The description
The class variables, which represent a single product sold by the store, should include the following data members:
The product ID number integer;
The description of the product character array;
The manufacturers ID number integer;
The wholesale price of the product double;
The mark-up percentage for the product double;
The quantity of product in inventory integer;
The class should have the following member functions:
Two constructors. The first is the default, which sets all of the members of the class to zero. The second constructor should enable the user to specify all of the initial attributes of the members of the class.
Separate functions which return the values of the members of the class.
A function that displays the values of the members of the class to the monitor (as described in the output section for program #1 on page 119). Page 119 = The retail price for the product (the wholesale price increased by the mark-up percentage) should be printed as a separate item from the above listing.
A function that returns the class objects retail price (the wholesale price increased by the mark-up percentage).
Create a Graphical User Interface (GUI) that provides a text box for each of the input data items for the product in inventory. Two buttons should appear on the form one which allows the user to display the information concerning the product (as described in the output section) and the other to exit the program.
When the button is clicked to display the information concerning a product, the text in each text box should be extracted and stored in a character array. These arrays should then be converted to the appropriate data type (as described in section #1), an object of the class should be created by calling the appropriate constructor, and the retail price of the item should be calculated using the appropriate member function for the class. Lastly, the data members for the object should be written to the appropriate output text boxes using a conversion function.
Upon clicking in the first input text box, all text should be cleared from all text boxes on the form. When the button is clicked to exit the program, the program should terminate.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
