PROBLEM: Write a program that prompts the user to input the amount of money that an ATM machine will dispense and then show the breakdown of how many 1000, 500, and 100 peso bill/s are dispensed. The program must display the amount then prompt the user if the transaction will continue or not by choosing between Y (for Yes) and N (for No). If an invalid character is entered, it must display that the user entered an invalid character. The program must also display that the maximum allowable amount is 10,000 and the minimum allowable amount is 100. If the entered amount is greater than 10,000 or less than 100, an error notification must be displayed. Moreover, the entered amount must be exactly divisible by 100.   TEST CASES: If a user inputs an amount less than or equal to 10,000: REMINDER: Maximum amount must only be 10,000 and the minimum amount must not be less than 100 Enter Amount to dispense: 4900 The Amount of money you entered is 4900. Do you want to continue your transaction? Enter Y for 'Yes' and N for 'no': Y Breakdown of dispensed peso bill: The number of dispensed 1000-peso bills is 4 The number of dispensed 500-peso bills is 1 The number of dispensed 100-peso bills is 4 If a user inputs an amount less than or equal to 10,000: REMINDER: Maximum amount must only be 10,000 and the minimum amount must not be less than 100 Enter Amount to dispense: 7400 The Amount of money you entered is 7400. Do you want to continue your transaction? Enter Y for 'Yes' and N for 'no': Y Breakdown of dispensed peso bill: The number of dispensed 1000-peso bills is 7 The number of dispensed 500-peso bills is 0 The number of dispensed 100-peso bills is 4

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

PROBLEM:
Write a program that prompts the user to input the amount of money that an ATM machine will dispense and then show the breakdown of how many 1000, 500, and 100 peso bill/s are dispensed. The program must display the amount then prompt the user if the transaction will continue or not by choosing between Y (for Yes) and N (for No). If an invalid character is entered, it must display that the user entered an invalid character. The program must also display that the maximum allowable amount is 10,000 and the minimum allowable amount is 100. If the entered amount is greater than 10,000 or less than 100, an error notification must be displayed. Moreover, the entered amount must be exactly divisible by 100.

 

TEST CASES:

If a user inputs an amount less than or equal to 10,000:

REMINDER: Maximum amount must only be 10,000 and the minimum amount must not be less than 100

Enter Amount to dispense: 4900
The Amount of money you entered is 4900.
Do you want to continue your transaction?
Enter Y for 'Yes' and N for 'no': Y

Breakdown of dispensed peso bill:
The number of dispensed 1000-peso bills is 4
The number of dispensed 500-peso bills is 1
The number of dispensed 100-peso bills is 4

If a user inputs an amount less than or equal to 10,000:
REMINDER: Maximum amount must only be 10,000 and the minimum amount must not be less than 100

Enter Amount to dispense: 7400
The Amount of money you entered is 7400.
Do you want to continue your transaction?
Enter Y for 'Yes' and N for 'no': Y

Breakdown of dispensed peso bill:
The number of dispensed 1000-peso bills is 7
The number of dispensed 500-peso bills is 0
The number of dispensed 100-peso bills is 4

Expert Solution
steps

Step by step

Solved in 2 steps with 5 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education