Available Credit Design a hierarchy chart for a program that calculates a customer’s available credit. The program should carry out the following steps: 1\. Display the message “Enter the customer’s maximum credit.” 2\. Wait for the user to enter the customer’s maximum credit. 3\. Display the message “Enter the amount of credit used by the customer.” 4\. Wait for the user to enter the customer’s credit used. 5\. Subtract the used credit from the maximum credit to get the customer’s available credit. 6\. Display a message that shows the customer’s available credit.

Short Answer

Expert verified
Question: Design a hierarchy chart for a program that calculates a customer's available credit, following the given step by step solution.

Step by step solution

01

Display the message "Enter the customer's maximum credit."

Show a message to the user, asking them to enter the maximum credit for the customer.
02

Wait for user input for the customer's maximum credit

Get the user's input for the maximum credit and store it in a variable, for example, max_credit.
03

Display the message "Enter the amount of credit used by the customer."

Show another message to the user, asking them to enter the credit used by the customer.
04

Wait for user input for the customer's credit used

Get the user's input for the used credit and store it in a different variable, for example, used_credit.
05

Calculate customer's available credit

Subtract the used_credit from max_credit and store the result in a new variable called available_credit. This can be written as: available_credit = max_credit - used_credit.
06

Display the customer's available credit

Show the calculated available_credit to the user, displaying a message that indicates the customer's available credit.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Sales Tax Write high-level and detailed psuedocode for a program that calculates the total of a retail sale. The program should ask the user for • The retail price of the item being purchased • The sales tax rate Once these items have been entered, the program should calculate and display • The sales tax for the purchase • The total of the sale

Are programs expressed as English statements. What would each display on the screen if they were actual programs? The variable x starts with the value 0. The variable y starts with the value 5. Add 1 to x. Add 1 to y. Add x and y, and store the result in y. Display the value in y on the screen.

Words or names defined by the programmer are called _________.

Before a programmer can design a program he or she must have some basic knowledge about the domain, or area, the program will deal with and must understand exactly what it is that the client wants the program to do. Otherwise the final program may not work correctly or may not meet the client’s needs. Suppose one of your friends, who paints the insides of houses, has asked you to develop a program that determines and displays how much paint is needed to paint a room if the length and width of the room is input. What information are you lacking that you need to write this program? Write at least three questions that you would need to ask your friend before starting the project.

Account Balance Write high-level and detailed psuedocode for a program that calculates the current balance in a bank account. The program must ask the user for • The starting balance • The total dollar amount of deposits made • The total dollar amount of withdrawals made Once the program calculates the current balance, it should be displayed on the screen.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free