computer science

posted by .

You are required to use the Account class to simulate an ATM machine. Create ten accounts in an array with id 0, 1, 2 ...9, and initial balance $50. The system prompts the user to enter an id. If the id is entered incorrectly, ask the user to enter a correct id. Once an id is accepted, the main menu is displayed as shown in the sample run. You can enter a choice 1 for viewing the current balance, 2 for withdrawing money, 3 for depositing money, and 4 for exiting the main menu. If the user tries to withdraw more money than is available, the program reports a “Not enough funds.” message. Once you exit, the system will prompt for an id again. So, once the system starts, it will not stop. To exit the program the user must -1 when an id is requested.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. computer science

    Please design the ¡§Classes¡¨ that will work together for the implementation of the User Case ¡§Validate User¡¨ in the ATM machine. its just want us o write a diagram..
  2. programming

    How to write a program to create a class roster using an array?
  3. programming

    Create the logic for a program that prompts a user for three numbers and stores them in an array. Pass the array to a method that reverses the order of the numbers. Display the reversed numbers in the main program.
  4. Java programming

    Write a Java program that stores Customer accounts with the attributes: (i) Name of the depositor (ii) Account number (iii) Type of account (iv) Balance amount And the methods: (i) Deposit (ii) Withdraw (iii) Display the balance You …
  5. Java programming

    can u give me some example of withdrawal money program using array to store ten information of user. including the attributes: (i) Name of the depositor (ii) Account number (iii) Type of account (iv) Balance amount And the methods: …
  6. programming

    Write a program which allows user to enter 10 student names and scores for Java programming 1 and Java programming 2. Allow user to choose which course they want to enter the record for. Use the loop to ask input from user. The program …
  7. Computer Programming

    Create the flowchart and algorithm for a module that will prompt the user to enter the amount of cash they have in their pocket. The program should output “Not Enough” ($0 - $0.64), “Vending Machine” ($0.65 - $1.99), “Fast …
  8. computer code

    Create a Flowchart and pseudocode. Create a class whose main method creates three arrays. The first array will contain five kinds of flowers - petunia, pansy, rose, violet, and carnation. The second array will contain the cost of each …
  9. Linux

    you will design and implement a script that operates an ATM machine. Your script should be able to let users withdrawn money from their checkings or savings account, transfer money between accounts, and check the accounts' balances. …
  10. Program Design and Development

    Design a Visual Logic flowchart for a program that prompts the user to enter ten numbers one at a time. After the user has entered all ten number the program will then print out the total of those ten number and quit?

More Similar Questions