Question: Utopia Bank has employed you to develop an interactive system for their Change Machines. This system allows users to change cash between different note values.

Utopia Bank has employed you to develop an interactive system for their Change Machines. This system allows users to change cash between different note values.

The system will start by interactively prompting the user for the number of required notes for each of the $5, $10, $20, $50 and $100 values. After each entry, the system should display the current required amount.

After the required notes and numbers have been entered, the system will interactively prompt the user for the deposited note values. This should continue as long as the deposited amount is less than the required amount. The system should display the remaining balance before each prompt. The system should also reject note values other than 5, 10, 20, 50 or 100.

Finally, the system will compare the deposited amount and the required amount. If the deposited amount exceeds the required amount, the system will reject the deposit and print an error message indicating that the transaction cannot be completed. If the deposit amount equals the required amount, the system should print a message indicating that the required notes are being issued and display the number of notes being issued for each value.

Note: You are not required to handle additional error conditions not mentioned above. For example, non-numeric or negative inputs.

Constraints

You must not import any library or module into your program.

Sample Runs

Review the sample runs below to clearly understand all the requirements.

Sample Run 1

---------------------- WELCOME TO UTOPIA BANK ---------------------- Enter the required number of $5 notes: 4 ** Required amount is $20 ** Enter the required number of $10 notes: 4 ** Required amount is $60 ** Enter the required number of $20 notes: 2 ** Required amount is $100 ** Enter the required number of $50 notes: 0 ** Required amount is $100 ** Enter the required number of $100 notes: 0 ** Required amount is $100 ** ** Remaining balance is $100 ** Enter the deposited note value (5, 10, 20, 50 or 100): 50 ** Remaining balance is $50 ** Enter the deposited note value (5, 10, 20, 50 or 100): 40 ** Invalid value! ** Enter the deposited note value (5, 10, 20, 50 or 100): 50 ** Issuing notes ** $5 [4] $10 [4] $20 [2] $50 [0] $100 [0] ** Thanks for choosing Utopia Bank **

Sample Run 2

---------------------- WELCOME TO UTOPIA BANK ---------------------- Enter the required number of $5 notes: 0 ** Required amount is $0 ** Enter the required number of $10 notes: 1 ** Required amount is $10 ** Enter the required number of $20 notes: 2 ** Required amount is $50 ** Enter the required number of $50 notes: 2 ** Required amount is $150 ** Enter the required number of $100 notes: 0 ** Required amount is $150 ** ** Remaining balance is $150 ** Enter the deposited note value (5, 10, 20, 50 or 100): 100 ** Remaining balance is $50 ** Enter the deposited note value (5, 10, 20, 50 or 100): 100 ** The deposit amount $200 exceeds the required amount $150! ** ** Transaction cannot be completed ** ** Thanks for choosing Utopia Bank **

Task 1 (3 marks)

Draw a flowchart that presents the steps of the algorithm required to perform the task specified. It is recommended to use Draw.io to draw your flowchart.

Task 2 (12 marks)

Implement your algorithm in Python. Comment on your code as necessary to explain it clearly.

Task 3 (5 marks)

Select at least three sets of test data that will demonstrate the normal operation of your program; that is, test data that will demonstrate what happens when a valid input is entered. Select at least two sets of test data that will demonstrate the abnormal operation of your program; that is, test data that will demonstrate what happens when an invalid input is entered.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!