Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA PROGRAMMING Data Text Output ATM machine: Create a program to simulate an ATM machine. In this program a main menu will be displayed, giving
JAVA PROGRAMMING
Data Text
Output
ATM machine: Create a program to simulate an ATM machine. In this program a main menu will be displayed, giving the users the following options: 1. Check balance 2. Withdraw 3. Deposit 4. Exit Based on the user's choice your program should display the information. Note: A data file data.txt has been provided. Here are the classes that needs to be implement: 1. Create a class called Account with the following UML diagram. Compile your code Account int id //default 0 String name //default -double balance // default 0 -boolean active //set to false by default +Account() I/sets all the instance variables to the default values +Account (int id, double balance, String name)//creates an account with the given info +getid): i +getBalance): balance// returns the balance +getName): name +setld(int id): void +setName(String name): void +setActive(boolean b): void +setBalance(double bl: void tactivateAccount(): void // sets the active variable to true +deactivateAccount(): void //set the active variable to false +closel): void// this method closes the account by withdrawing all the money, and deactivates the account deposit(double amount]: void//deposit the given amount to the balance +withdraw(double amount): void//withdraw the amount from the balance, check to see if amountStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started