Simulate the operations of an ATM machine. First, the customer is prompted to enter his personal identification number pin (for…

Simulate the operations of an ATM machine. First, the customer is prompted to enter his personal identification number pin (for this case study, we test only if this pin is formed by 4 digits, otherwise a message like “Invalid PIN, try again…” will be displayed) and the user is re-prompted to enter the pin. The customer is given three chances to enter his pin. If he/she fails during the three trials you display a message like “Sorry you can’t continue, contact your bank for assistance.”

 

Don't use plagiarized sources. Get Your Custom Essay on
Simulate the operations of an ATM machine. First, the customer is prompted to enter his personal identification number pin (for…
Get a PLAGIARISM-FREE custom essay written for you!
Order Essay

If the pin is correct (formed by 4 digits), then the system will ask the customer for the receipt (1 for YES and 2 for NO) and a menu will be displayed containing five possible options to choose from: Fast Cash, Deposit, Withdraw, Balance, and Get Card Back. 

 

Here is an explanation of each of the 5 options:

Get card back: Display the message “Goodbye!” and exit program.

Fast Cash: Let the customer choose the amount of cash from a menu similar to the following:

Press 1–> $20.00      $40.00 <–2

          3–> $80.00      $100.00 <–4

Withdraw: Prompt the user for the amount of money he/she would like to withdraw and make sure that he/she has enough money for that.

Deposit: Promt the customer for the amount of deposit.

Balance: Just display the amount of money the customer has.

 

Don’t forget to print the receipt if the customer wants one.

 

Sample execution: (text in brackets represents the user entry)

 

Virtual Bank at West

WELCOME

 

Enter PIN: [245]

Invalid PIN, Re-enter PIN: [5487]

 -clear screen-

 

Receipt Y -> Yes     No <- N

Enter choice: [N]

-clear screen-

 

CHOOSE FROM THE FOLLOWING

1-> Fast Cash     Withdraw <-2

3-> Deposit     Check balance <-4

5-> Get card back

 

Enter your choice: [4]

-clear screen-

Your balance is: $125.32

 

1-> Another Transaction     Get Card Back <-2

Enter your choice: [1]

-clear screen-

 

CHOOSE FROM THE FOLLOWING

1-> Fast Cash     Withdraw <-2

3-> Deposit          Check Balance <-4

5-> Get card back

Enter your choice: [2]

-clear screen-

 

Enter amount (enter 0 to cancel): [300.00]

Sorry, not enough balance

Enter amount (enter 0 to cancel): [30.00]

Take your cash…

-clear screen-

 

Your balance is: $124.32

1-> Another transaction     Get card back <-2

Enter your choice: [1]

-clear screen-

CHOOSE FROM THE FOLLOWING

1-> Fast Cash     Withdraw <-2

3-> Deposit          Check Balance <-4

5-> Get card back

Enter your choice: [8]

Invalid entry

-clear screen-

 

CHOOSE FROM THE FOLLOWING

1-> Fast Cash     Withdraw <-2

3-> Deposit          Check Balance <-4

5-> Get card back

Enter your choice: [5]

-clear screen-

 

THANK YOU FOR USING OUR VIRTUAL BANK SYSTEM

GOODBYE…

Homework Paper
Order NOW For A 10% Discount!
Pages (550 words)
Approximate price: -

Our Advantages

Plagiarism Free Papers

All our papers are original and written from scratch. We will email you a plagiarism report alongside your completed paper once done.

Free Revisions

All papers are submitted ahead of time. We do this to allow you time to point out any area you would need revision on, and help you for free.

Free Title-page

A title page preceeds all your paper content. Here, you put all your personal information and this we give out for free.

Free Bibliography

Without a reference/bibliography page, any academic paper is incomplete and doesnt qualify for grading. We also offer this for free.

Originality & Security

At Homework Sharks, we take confidentiality seriously and all your personal information is stored safely and do not share it with third parties for any reasons whatsoever. Our work is original and we send plagiarism reports alongside every paper.

24/7 Customer Support

Our agents are online 24/7. Feel free to contact us through email or talk to our live agents.

Try it now!

Calculate the price of your order

We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

We work around the clock to see best customer experience.

Pricing

Flexible Pricing

Our prces are pocket friendly and you can do partial payments. When that is not enough, we have a free enquiry service.

Communication

Admission help & Client-Writer Contact

When you need to elaborate something further to your writer, we provide that button.

Deadlines

Paper Submission

We take deadlines seriously and our papers are submitted ahead of time. We are happy to assist you in case of any adjustments needed.

Reviews

Customer Feedback

Your feedback, good or bad is of great concern to us and we take it very seriously. We are, therefore, constantly adjusting our policies to ensure best customer/writer experience.