IT 210 Check Point 2 week 2

# IT 210 Check Point 2 week 2 - Call Output Results Module...

This preview shows pages 1–2. Sign up to view the full content.

Analysis Process : 1. Display a program title. 2. Prompt for the item name. 3. Prompt for the price of the item. 4. Prompt for the weight in pounds. 5. Prompt for ounces. 6. Convert pounds to ounces and add it to the input ounces. 7. Divide total price by ounces. 8. Display the price per ounce. Input: Item Name (string: itemName) Item Price (real: price) Item Weight in pounds (integer: pounds) Fractional ounces (integer: ounces) Output: Unit price (real: unitPrice) Design Main Module Declare itemName as String Declare price as real Declare pounds as integer Declare ounces as integer Declare unitPrice as real Write “Unit Price Program” Write “This program computes the unit price for an item” Call Input Data Module Call Perform Calculations Module

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Call Output Results Module End Program End Main Module Input Data Module Write “What is the item’s name?” Input itemName Write “How much does the item cost?” Input price Write “What is the weight in pounds (no fractions)?” Input pounds Write “What are the fractional ounces?” Input ounces End Input Data Module Perform Calculations Module Set ounces = 16 * pounds + ounces unitPrice = price/ounces End Perform Calculations Module Output Results Module Write “The item is: “, itemName Write “The total price of the item is: \$“, price Write “The unit price of the item is: \$”, unitPrice, “per ounce” End Output Results Module...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

IT 210 Check Point 2 week 2 - Call Output Results Module...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online