The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Program #2
Purpose
Your lucrative consulting career continues! The retail store has hired you once again – this time to convert your simple inventory program from a console interface to a Windows interface. Specifically, you are to replace the “text-based” calling program that was developed as part of assignment #1 with a Windows graphic user interface (GUI).
Program Input
The input to the program will be the product id number (a 5-digit identification number), the manufacturer’s id number (a 4-digit identification number), the wholesale price of the product, the mark-up percentage for the product, the description of the product, and the quantity of product in stock.
The following is an example of this input:
The application should display a dialog box requesting the user to enter the information for a single product. The following is an example of such a dialog box for a store which sells office supplies:
Output
The application should display a listing of the data for a product in the store using appropriate labels and text boxes. This listing should include the following:
The product ID number;
The product description;
The manufacturer’s ID number;
The retail price of the product (the wholesale price increased by the mark-up percentage);
The quantity of product in inventory.
Processing
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 manufacturer’s 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 object’s 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.
// ************************************// * SPECIFICATION FILE (INVENTORY.h) *// ************************************#ifndefINVENTORY_H#de±neINVENTORY_H#include<string>usingnamespacestd;classInventory{private:intproductId;stringdescription;intmanufacturerID;doublewholesalePrice;doublemarkupPercentage;intquantity;public:Inventory();// constructorInventory(int,string,int,double,double,int);// constructor parametersintgetProductID();// returns product IDstringgetDescription();// returns descriptionintgetManufacturerID();// returns manufacturer IDdoublegetWholesalePrice();// returns wholesale pricedoublegetMarkupPercentage();// returns markup percentageintgetQuantity();// returns quantityvoiddisplayInventory();// displays the Inventory datadoublegetRetailPrice();// returns retail price};#endif
Program #2PurposeYour lucrative consulting career continues!The retail storehas hired you once again – this time to convert your simpleinventory program from a console interface to a Windowsinterface.SpeciFcally, you are to replace the “text-based”calling program that was developed as part of assignment#1 with a Windows graphic user interface (GUI).Program InputThe input to the program will be the product id number (a5-digit identiFcation number), the manufacturer’s idnumber (a 4-digit identiFcation number), the wholesaleprice of the product, the mark-up percentage for theproduct, the description of the product, and the quantity ofproduct in stock.The following is an example of this input:
Attachments:
-----------