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

  Make a game in which you guess a number

Make a game in which you guess a number between two set numbers to find the answer, the game should tell you if you are too low in your guess or too high. For example

  Write a program to determine a natural number

Write a program to determine if a natural number has only 2 and/or 3 as prime factors and how many of each factor (2 and 3) it does have.

  Execute the next line which is enter your last name

C++ in VS and I'm trying to run the following program. As soon as I put in my name after the 2nd cout statement, the program ends.

  Basics of code development on linux and cryptography

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 using argv and argc

  Your program will read the array

Your program will read the array from the file, check the diagonal and print a report containing the size and the status of the diagonal. A typical report would look like: The matrix is 3x3 and all the numbers on the main diagonal are the same.

  Keep track of the size of the array

Keep track of the size of the array so that you cannot exceed the array boundaries. The implementation details (i.e. the private members)of your class are up to you, but the class should have the following public interface

  Bare in mind this is a program

Bare in mind this is a program with the audience being lawncare and landscaping people. So the events will generally be to know how often a client wants their lawn mowed.

  Write c++ program to create a bar chart showing the average

Write a c++ program to create a bar chart showing the average monthly mean temperature for College Station from 2004 to 2013.

  Demonstrate overriding of their getter and setter methods

Organize following animals using classes and virtual function. tigers,crocodile, elephants,pythons,zebras,hawks, chickens,rabbits using at least 3 properties some of the animals share. demonstrate overriding of their getter and setter methods.

  Write a program that asks user to enter

Write a program that asks user to enter the size of the matrix (rows and column) then, it asks the user to enter the elements of two matrices and finally it adds two matrix and displays the result in C language.

  A stack is referred to as a last-in first-out

This lab, along with your TA, will help you navigate through designing, implementing, and testing a dynamic stack. Recall, a stack data structure is a restricted linked list, where only the top node in the stack may be accessed at any given time

  What is the output of this code fragment as it is written

In the code fragment below, the programmer has almost certainly made an error in the first line of the conditional statement.

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