SuperTutor

(15)

$15/per page/Negotiable

About SuperTutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Business & Finance See all
Accounting,Business & Finance,Economics,Engineering,HR Management,Math Hide all
Teaching Since: Apr 2017
Last Sign in: 234 Weeks Ago
Questions Answered: 12843
Tutorials Posted: 12834

Education

  • MBA, Ph.D in Management
    Harvard university
    Feb-1997 - Aug-2003

Experience

  • Professor
    Strayer University
    Jan-2007 - Present

Category > Programming Posted 10 Jul 2017 My Price 15.00

Write a windows console application

Write a windows console application that holds data about an item in a retail store.
Your class should be named RetailItem and should hold data about an item in a retail store. The class will have
the following member variables.
description—string holding the description of the item
unitsOnHand—int that holds the number of units in inventory
price—double that holds the price of the item
You will need two constructors, one that will accept arguments for each member variable and one that will
assign default values. You will also need to write mutator functions and accessor functions. Once you write the
class, write a separate program that creates three RetailItem objects. The first one should use the default
values, and the other two should have values assigned upon creation. The user should input the variables
(testing for the units on hand and price greater than 0).
Then the program should display all three RetailItems. Finally, the program should tally the inventory for all three
items and display it.
Welcome to the Retail store!
Price must be greater than 0.
Please enter the price for item 1: 33.
Inventory must be greater than 0.
Please enter the units on hand for item 1: 10.
Please enter the description for item 1: shirt. Display all items
Description: shirt
Units on hand: 10
Price: $33.00
Description: Jeans
Units on hand: 40
Price: $34.95
Description: Long sleeve shirt
Units on hand: 20
Price: $24.95 Display the total inventory.
The total inventory is 70.
Press any key to continue. Step 2: Processing Logic
You will create a RetailItem class, a main program, and a RetailItem.h for a total of three files as a
demonstration of understanding, creating, and using classes.
Using the pseudocode below, write the code that will meet the requirements.
Create a main program.
Create three RetailItem objects.
Ask user for price for item1 looping until value is greater than 0.
Ask user for unitsOnHand for item2 looping until value is greater than 0.
Ask user for description for item 1.
Display all items.
Add up total inventory, and display total inventory.
Create a RetailItem class.
Implement all member functions.
Create a RetailItem.h.
Private member variables should be description, unitsOnHand, and price.
Public member functions include both constructors, mutator, and accessor functions for all three
variables.

Attachments:

Answers

(15)
Status NEW Posted 10 Jul 2017 07:07 AM My Price 15.00

-----------

Attachments

file 1499670309-Solutions file.docx preview (51 words )
S-----------olu-----------tio-----------ns -----------fil-----------e -----------Hel-----------lo -----------Sir-----------/Ma-----------dam----------- T-----------han-----------k y-----------ou -----------for----------- yo-----------ur -----------int-----------ere-----------st -----------and----------- bu-----------yin-----------g m-----------y p-----------ost-----------ed -----------sol-----------uti-----------on.----------- Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m o-----------nli-----------ne -----------or -----------inb-----------ox -----------me -----------a m-----------ess-----------age----------- I -----------wil-----------l b-----------e q-----------uic-----------kly----------- on-----------lin-----------e a-----------nd -----------giv-----------e y-----------ou -----------exa-----------ct -----------fil-----------e a-----------nd -----------the----------- sa-----------me -----------fil-----------e i-----------s a-----------lso----------- se-----------nt -----------to -----------you-----------r e-----------mai-----------l t-----------hat----------- is----------- re-----------gis-----------ter-----------ed -----------onÂ----------- th-----------is -----------web-----------sit-----------e -----------Tha-----------nk -----------you----------- -----------
Not Rated(0)