Preview

It 210 Checkpoint Week 2

Good Essays
Open Document
Open Document
304 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
It 210 Checkpoint Week 2
Analysis

Process:

1. Display program welcome message
2. Ask for item name
3. Ask for item price
4. Ask for pound weight
5. Ask for ounces
6. Convert pounds to ounces then add to input ounces
7. Divide total price by ounces
8. Display the price per ounce.

Input:

Item Name
Item Price
Item Weight in pounds
Ounces as integer

Output:

Unit price

Main Module

Declare Name as String
Declare Price as real
Declare Lbs as integer
Declare Oz as integer
Declare UnitPrice as real
Display "Marc’s Unit Pricing Program"
Display "This program will break down the weight of an item from pounds to ounces, and will then give you the price per ounce for the product listed."

Call Input Data Module
Call Perform Calculations Module
Call Output Results Module

End Main Module

REM now we get all the pertinent information that we need.

Input Data Module

Display "Name of the Item?"
Input Name
Display "How much does it cost?"
Input Price
Display "Item Weight in pounds only?"
Input weight in Lbs
Display "Please enter any additional ounces if listed?"
Input Oz

Display “Please confirm if the entry is correct.”
PAUSE
If yes then
Display “Enter to continue” Or else
Call input data module again

End Input Data Module

REM it is time now to calculate or break down theunit price into size’s which this module does.

Perform Calculations Module

Set Oz = 16
UnitPrice = Price/Oz

End Perform Calculations Module

REM the module below takes the data that we received from user input and after the calculations, displays the unit price and other information to the user.

Output Results Module

Display "The item is: ", Name
Display "Total price of item:", Price
Display "Unit price per ounce:", UnitPrice
Display “Thank you for using Marc’s Unit Pricing Program promotion!”

End Output Results

You May Also Find These Documents Helpful