Ch09_Logic9e_Solutions.doc - Programming Logic and Design...

This preview shows page 1 - 3 out of 38 pages.

Programming Logic and Design, 9eSolutions 9-Programming Logic and Design, 9th EditionChapter 9Review QuestionsTHE REVIEW QUESTIONS HAVE BEEN OMITTED FROM THE AVAILABLE RESOURCES FOR STUDENTS BECAUSE SOME OF THE QUESTIONS MAY BE USED ON THE QUIZ.Programming Exercises1.Create an IPO chart for each of the following methods:a.The method that calculates the amount owed on a restaurant check, including tip
Calculate amount owed by multiplying the bill total by 20% for the tip; add this product to the bill total. The result is the amount owed, including tip. b.The method that calculates the cost to drive your car a mile
Calculate the gas price per mile by dividing the cost of a gallon of gas by the average miles/gallon. Calculate the cost of maintenance for a mile by dividing the annual maintenance cost by the number of miles driven per year. Add the gas cost per mile to the maintenance cost per mile to get the cost to drive a mile.
1
Programming Logic and Design, 9eSolutions 9-c.The method that calculates your annual medical expenses after the insurance company has made its payments
2.a. Create the logic for a program that calculates and displays the amount of money you would have if you invested $5000 at 2 percent simple interest for one year. Createa separate method to do the calculation and return the result to be displayed.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture