+1 (208) 254-6996 [email protected]
  

Week 6: Lab  

( Student Lab Activity )devry-u-rgb_logo-small

Don't use plagiarized sources. Get Your Custom Essay on
Week 6: Lab
Just from $13/Page
Order Essay

CIS170C Week 6 Lab Instructions

Lab 6 of 7: Menu-Driven Application

Lab Overview – Scenario/Summary

You will code, build, and execute a Retail Item class that holds data about an item in a retail store.You will utilize classes in the design of this program.

Learning outcomes:

1. To be able to understand the classes and objects used in a Windows console application

2. To be able to write a Windows console application

Deliverables

SectionDeliverablePoints
Lab 6Step 5: Program Listing and Output40
All StepsTotal40

Lab Steps

Preparation:

If you are using the Citrix remote lab, follow the login instructions located on the iLab tab in Course Home.

Locate the Visual Studio icon and launch the application.

Part A: Password Program
Step 1: Requirements
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 inventoryprice – double that holds the price of the itemYou will need two constructors, one that will accept arguments for esach 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: 33Inventory must be greater than 0.Please enter the units on hand for item 1: 10Please enter the description for item 1: shirtDisplay all itemsDescription: shirtUnits on hand: 10Price: $33.00Description: JeansUnits on hand: 40Price: $34.95Description: Long sleeve shirtUnits on hand: 20Price: $24.95Display the total inventoryThe total inventory is 70Press 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 programCreate three RetailItem objectsAsk user for price for item1 looping until value is greater than 0Ask user for unitsOnHand for item2 looping until value is greater than 0Ask user for description for item 1Display all itemsAdd up total inventory and display total inventoryCreate a RetailItem ClassImplement all member functionsCreate a RetailItem.hPrivate member variables should be description, unitsOnHand, and pricePublic member functions include both constructors, and mutator and accessor functions for all three variables.
Step 3: Create a New Project
Create a new project and name it LAB6. Write your code using the Processing Logic in Step 2. Make sure you save your program.
Step 4: Compile and Execute
a) Compile your program and eliminate all syntax errors.b) Build your program and verify the results of the program. Make corrections to the program logic if necessary until the results of the program execution are what you expect.
Step 5: Print Screenshots and Program
1. Capture a screen print of your output. (Do a PRINT SCREEN and paste into an MS Word document.)2. Copy your code and paste it into the same MS Word document that contains the screen print of your output.3. Save the Word document as Lab06 _LastName_FirstInitial.
END OF LAB

Version 1.0 Page 1 of 9

4/9/2009 Lab 6 Instructions JWK

Page 1 of 3

CIS170C Week 6 Lab Instructions

Lab Overview

Scenario/Summary

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.

Be sure to think about the logic and design first, then code the C++ program.

Deliverables

· Working Program

Required Software

Microsoft Office: Word and Visual Studio

Use a personal copy or access the software at  https://lab.devry.edu (Links to an external site.) .

Lab Steps

Video Insights

To help prepare you for this activity please watch the following videos:

Week 6 Part 1

Week 6 Part 1

Steps

Here are the  Week 6 Lab Instructions (Links to an external site.) .

· Develop and test your program.

· Submit all deliverables.

Order your essay today and save 10% with the discount code ESSAYHELP