Preview

Week 2 Chrchpoint Essay Example

Good Essays
Open Document
Open Document
337 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Week 2 Chrchpoint Essay Example
2. The manager of the Super Supermarket would like to be able to compute the unit price for products sold there. To do this, the program should input the name and price of an item and its weight in pounds and ounces.
Then it should determine and display the unit price (the price per ounce) of that item and the total cost of the amount purchased. You will need the following variables:

ItemName (a String) Pounds (a Float) Ounces (a Float)
PoundPrice (a Float) TotalPrice (a Float) UnitPrice (a Float)
You will need the following formulas:
UnitPrice = PoundPrice/16
TotalPrice = PoundPrice*(Pounds + Ounces/16)

Process: 1. Display a Title of Program 2. Prompt for Item Name 3. Prompt for Item Price 4. Prompt for Weight in Pounds 5. Prompt for Ounces 6. Convert Pounds to Ounces and add to Input Ounces 7. Divide Total Price by Ounces 8. Display Price per Ounce
Input:
Item Name (string: ItemName) Item Price (Real: Price) Item Weight in Pounds (Integer: Pounds) Fraction of 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 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 items 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 = pounds/16 + ounces unitPrice = price/ounces

End Perform Calculations Module

Output Results Module

Write “The item is,” itemName

You May Also Find These Documents Helpful

  • Good Essays

    QLT1 Task 5 Essay Example

    • 615 Words
    • 3 Pages

    Parking Garage A will be charged a flat rate regardless of how many days it is used. Thus having the days cancel out so the flat 30 dollars is consistent across the month is needed to compare the relationship of parking garage B.…

    • 615 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    -If the Salary Range is greater than 3,000.00, then the tax base is $465.00 plus 18% of…

    • 516 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    The objective of this project is to help train DC Construction staff with their BRIX problems by planning how to operate the new system. The company will provide 20 laptops for this training session. When DC Construction changes their BRIX system, they will also change their financial system. Currently all locations have trouble with the financial and accounting system. The sites do not have a standard system, which may have contributed to the problem. The new STIX system will allow each site to have a high of compatibility through a standardized operating system. The company will implement the new system in six months, and will be operational, company wide, by August 30 next year. A development team will come up with a project plan to update DC Construction’s BRIX system. Management will be notified of any resources they may need to accomplish this task.…

    • 717 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    IT210 Week 3

    • 756 Words
    • 4 Pages

    Resources: Review the example in Appendix E and the additional examples on pgs 80-83 of Prelude to Programming…

    • 756 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    -3x/1 +330 = y expression switch by place the y on the right hand side…

    • 643 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Write a paragraph (minimum five college-level sentences) below that summarizes what was accomplished in this lab, what you learned by performing it, how it relates to this week’s TCOs and other course material, and (just as important) how you feel it will benefit you in your academic and professional career. (13 points)…

    • 447 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    This paper will be an analysis of articles and the psychological concepts that the authors of these articles were researching. This paper will also discuss the types of research and studies that the authors used to investigate those concepts. In addition this paper will examine relationships between the consumer psychology and the marketing communications.…

    • 1029 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Post a 200- to 300-word response explaining the concepts behind the Pro-nature and Pro-nurture perspectives. Consider the following questions:…

    • 333 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

     How might you use the strategies for applying creativity to problems and issues in addressing this topic?…

    • 435 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Project Management

    • 734 Words
    • 3 Pages

    display “This is a best selling candy! Name: “, name, “Price per pound: “, pricePerPound, “Pounds sold:”, poundsSold…

    • 734 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Target Customer The target customers for the 100 GB Dropbox Student Offering accounts are college students, both undergraduate and graduate students alike. These students should have a need for a larger amount of storage than the 2 GB offered as a free service. In addition to requiring additional storage these students should have the need to access documents from multiple devices. Sample Data To generate sample data I used a survey with the question “How much…

    • 289 Words
    • 12 Pages
    Satisfactory Essays
  • Good Essays

    Java

    • 827 Words
    • 4 Pages

    16. A flower shop sells roses for P50 each, orchids for P80 each, and tulips for P90 each. Write a Java program that would input the number of roses, orchids, and tulips a customer bought and output the total cost.…

    • 827 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Currency Conversion

    • 602 Words
    • 3 Pages

    3. User has 5 currencies (Canadian dollars, Mexican Pesos, English Pounds, Yen, and Francs) to choose from to convert to dollar amount or vice versa.…

    • 602 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    13 FSLCE Mathematics QP

    • 3094 Words
    • 47 Pages

    If you need more paper, ask the supervisor for extra sheets. Tie these sheets inside the Answer…

    • 3094 Words
    • 47 Pages
    Satisfactory Essays
  • Good Essays

    Index Numbers

    • 3651 Words
    • 15 Pages

    INDEX NUMBERS compare figures which show changes in a given variable. The most common variables used in index numbers are price and quantity. By getting the difference of the index numbers, we are able to determine the relative or percent change in the price or quantity of a commodity between two periods of time or two localities.…

    • 3651 Words
    • 15 Pages
    Good Essays