Logic7e_Solutions_ch09 - Programming Logic and Design 7e...

This preview shows page 1 - 5 out of 37 pages.

Programming Logic and Design, 7eSolutions 9-Programming Logic and Design, 7th EditionChapter 9Exercises1.Create an IPO chart for each of the following methods:a.The method that calculates the amount owed on a restaurant check, including tip
Amount of tipCalculate amount owed by multiplying the bill total by the tax rate; add this product to the bill total and then finally add the amount of tip to this. The result is the amount owed, including tip. b.The method that calculates your yearly education-related expenses
Calculate the tuition by multiplying the number of credits by the per credit fee; add this product tothe other admission fees to get the tuition. Add the tuition, annual housing fee, annual meal plan fee, and annual book expense to get the annual education expenses.c.The method that calculates your annual housing expenses, including rent or mortgage payment and utilities
1
Programming Logic and Design, 7e
2.Create the logic for a program that continuously prompts the user for a number of dollars until the user enters 0. Pass each entered amount to a conversion method that displays a breakdown of the passed amount into the fewest bills; in other words, the method calculates the number of 20s, 10s, 5s, and 1s needed.
Programming Logic and Design, 7eSolutions 9-Pseudocode:startDeclarationsnum dollarsdollars = inputDollarAmt()while dollars not equal to 0dollarConversion(dollars)dollars = inputDollarAmt()endwhilestop3
Programming Logic and Design, 7e

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture