Design a special atm machine
Course:- C/C++ Programming
Reference No.:- EM13700177

Assignment Help
Expertsmind Rated 4.9 / 5 based on 47215 reviews.
Review Site
Assignment Help >> C/C++ Programming

A charitable organization wants to design a special ATM machine to be used by needy people.

The association supplies the needy person with a pin number to be able to use the ATM machine.

He/she can then retrieve up to $150 per day depending on his/her needs (if possible less than $150 as contracted with the association which will penalize in case of misuse). The total daily balance of the machine is $2000.

When this amount is used nobody can retrieve anything further.

The person in charge of checking the balance, filling the machine and shutting down the machine (by pressing -1) has pin code 111.

Implement a program for this machine. Your program must start by displaying a main menu as follows:


1- Retrieve money
2- Check Ba lance

Enter your choice:

When the user chooses menu item 1:

o he will be asked to enter his pin code and the code will be validated

o a valid pin code must be between 3000 - 10000 and should be divisible by 2

o If the pin is valid the user specifies the amount to retrieve which should be less than or equal to $150

o The amount must be retrieved from the total ATM balance

o The amount must be smaller or equal to the ATM balance else indicate that there is not enough money

o Let the program display the dollar amount as bills and coins
o The charitable association wants to have as many high denomination bills and coins as possible. The highest denomination bill that they would receive is a $20 bill and they will not receive any half dollar coins

For example, $62.30 would be split into 3-$20 bills, 0-$10 dollar bills, 0-$5 bills, 2-$1 bills, 1-quarters, 0 dimes, 1-nickels and 0-pennies. It would NOT be 0-$20 b ills, 6-$10 bills, 0-$5 bills, 2-$1 bills, 0-quarters, 3-dimes, 0-nickels and 0-pennies

Note that 1 quarter = $0.25
1 dime = $0.1
1 nickel = $0.05
1 penny = $0.01

o If the pin code was not valid display an error message
o After displaying the result the user must enter 0 to return to the main menu after clearing the screen
o Make sure to validate all your input and guide the user to enter correct values

When the user chooses menu item 2:

o he will be asked to enter his pin code

o If the pin code is 111 the balance is displayed else an error message is displayed

o After displaying the balance, the user must enter -1 to shutdown the machine or 0 to go back to the main menu after clearing the screen

o Make sure to validate all your input and guide the user to enter correct values

Put your comment

Ask Question & Get Answers from Experts
Browse some more (C/C++ Programming) Materials
Using virtual methods, organize the animals in a small zoo, having as guests lions, parrots, alligators, penguins, elephants, cobras, zebras, hawks, turkeys and rabbits.
Prepare a C program that gives simple mono-alphabetic substitution between plaintext, and Enhance your code to use "-e" to encrypt a string argument and "-d" to decrypt it usi
If the function discovers that the number of cells in the large array is not large enough to hold all the numbers to be copied into it, then the function should return 0 to
Describe your experiences on writing and testing your first C program. Gives examples of where you got stuck?. What difficulties you faced? What did you learn from this expe
We can combine assignment statements, for-loops, and if statements to perform a wide range of tasks with lists. Suppose we have a bookstore with each book defined as follows
Take the following C++ code and make the following changes. Change the inheritance to private inheritance. Change the private data member balance to protected. Define get func
Problem 2: Direct Cost Variance Analysis  Ken Co. uses standard costing for accounting. Following is the standards for production of its only product:Direct material: 18 pound
This problem contains a design with a while loop. Assume that sum references a doubleword in the data segment and that count is in the ECX register. Give a fragment of 80x86