Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using this previous code in c++ Your lucrative consulting career continues! The retail store has hired you once again this time to convert your simple

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedUsing this previous code in c++

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 manufacturers 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 manufacturers 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 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.

#include #includeiomanip> using namespace std; class Product public: aniiiaaii //*Constructors* aniiiaaii Product(); Product (int, char[], int, double, double, int); //*Return values of private members int GetProductID) const; char* GetProductDescription) const; int GetManID() const; double GetwholePrice() const; double GetMarkup() const; int GetQuantity) const; /Displays information from products* void Display() const; private: int ProductID; mutable char ProductDescription[30]; int ManID; double WholePrice: double Markup; int Quantity; aniiixn*x* //*Implementation* aniiixn*x* #include #includeiomanip> using namespace std; class Product public: aniiiaaii //*Constructors* aniiiaaii Product(); Product (int, char[], int, double, double, int); //*Return values of private members int GetProductID) const; char* GetProductDescription) const; int GetManID() const; double GetwholePrice() const; double GetMarkup() const; int GetQuantity) const; /Displays information from products* void Display() const; private: int ProductID; mutable char ProductDescription[30]; int ManID; double WholePrice: double Markup; int Quantity; aniiixn*x* //*Implementation* aniiixn*x*

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

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

Students also viewed these Databases questions

Question

=+ Of the HR issues mentioned in the case,

Answered: 1 week ago