Implement a program for this machine

Assignment Help C/C++ Programming
Reference no: EM13703915

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).

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:

THE NEEDY ATM SERVICE

1- Retrieve money

2- Check Balance

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 4000 - 6000 and should be divisible by 2 

o If the pin is valid the user specifies the amount to retrieve which should be between $0 and $150

o If amount is not within this range keep asking the user to enter another value

o The amount must be smaller or equal to the ATM balance else indicate that there is not enough money and keep asking the user to enter another value less or equal to the ATM balance

o The amount must be retrieved from the total ATM balance

o If an amount was successfully retrieved, let the program display the dollar amount as bills and coins 

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

0-pennies

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

  • If the pin code was not validdisplay an error message
  • After displaying the result the user must enter 0 to return to the main menu after clearing the screen (google it)
  • Make sure to validate all your input and guide the user to enter correct values

When the user chooses menu item 2:

  • he will be asked to enter his pin code
  • If the pin code is 111 the balance is displayed else an error message is displayed
  •  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
  • Make sure to validate all your input and guide the user to enter correct values

Reference no: EM13703915

Questions Cloud

Torsion spring to inverted pendulum : If you attach torsion spring to inverted pendulum, is this the equation of motion? The spring is attached on one end to a pivot point and also at the pivot point the spring is attached. I used L/2 for the location of the center of mass.
What is the maximum available friction force : A block weighing 80 N is resting on a plane inclined 20 degree to the horizontal. The coefficient of static friction is 0.5. Determine the friction force on the block. What is the maximum available friction force?
Velocity and acceleration analysis of mechanism : Velocity and Acceleration Analysis of mechanism. The mechanism in Fig. 5.54 has the dimensions: AB=200 mm, AC=600 mm, BD=1000 mm, La=150 mm, and Lb=250 mm. The driver link 1 rotates with a constant angular speed of n=60 rpm. Find the velocities and t..
Find the viscosity of the emulsion : You are asked to measure the viscosity of an emulsion, so you use a tube flow viscometer, with the container open to the atmosphere. The length of the tube is 10 cm, its diameter is 2mm, and the diameter of the container is 3 in.
Implement a program for this machine : Implement a program for this machine - design a special ATM machine to be used by needy people.
Amount of the prospective future receipts from the wells : A petroleum engineer estimates that the present production of 400,000 barrels of oil during this year from a group of 10 wells will decrease at the rate of 15% per year for years 2 through 10. Oil is estimated to be worth $25 per barrel. If the inter..
Assume a constant specific heat capacity : Argon is contained in a 1 L piston-cylinder device at T=300 K and P=100 kPa. Heat is added and the volume is allowed to expand at constant pressure. If the final temperature is 400 K, find the heat added. Assume a constant specific heat capacity. Exp..
Conventional lead-acid automobile battery : The cold cranking amperes (CCA) of a conventional lead-acid automobile battery is the amount of current the battery can provide at 0°F for 30 seconds and maintain at least 1.2 volts per cell (or 7.2 volts for a standard 12-volt battery). If a batter..
A metal has an atomic radius : A metal has an atomic radius of 0.125 nm, an atomic weight of 58.69 g/mol and a density of 8.9 g/cm3. Determine whether it has a BCC or an FCC crystal structure

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create a program that displays the number of days in a month

Create a program that displays the number of days in a month. Use a 12-element one-dimensional array to store the number of days in each month (use 28 for the number of days in February).

  You will write a program that reads a text file

You will write a program that reads a text file, counts the number of words in the file, and the number of occurrences of each character. It will print to a file the number of words, and the number of occurrences of each character, as well as the ..

  Determine the manner in which each of the provided concepts

Provide a short code example of the use of C++ syntax within the context of an employee database and determine the manner in which each of the provided concepts relates to the concept of object-oriented programming.

  Calculates the sum of the cube roots of two integers.

Wrtie a program that calculates the sum of the cube roots of two integers. The program should use the following functions as well as a main funcion. 1) enter one positive value 2) compute the cube root of one integer 3) report the value of two intege..

  Ansi-c program complete assignment as follows in the

complete assignment as follows in the

  Ansi-c program complete assignment as per written in the

complete assignment as per written in the attached

  Object-oriented systems is the concept of object

At the heart of all object-oriented systems is the concept of an object. Simply stated, an object is a set of related characteristics and their associated actions.

  Write a program that fills in an array

Write a program that fills in an array, a, of 25 integers where each element contains the sum of all the previous elements plus 1, e.g., a[0] is 1 and a[3] is equal to a[0] + a[1] + a[2] + 1.

  Write a program to analyze students course marks

Write a program to analyze students course marks. The program should read in students course marks from "m2-grading.txt". The data file has a headline including students ID#, course-1marks, course-2 marks and course-3 markes.

  Assume that a text file named text1txt contains text

Assume that a text file named text1.txt already contains some text written into it, write a function named vowelwords(), that reads the file text1.txt and create a new file named text2.txt,

  Store user input - write c++ program

Write C++ program to provide the following functionality - Ask users to enter 10 integer numbers.

  Write a statement to call the function

Write an if statement that will assign 7 to p if the variable q is outside the range 100 through 1000. (Use single spaces between operators, operands and statements)

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd