Question: CSC 15 Project #4 ATM machine: Create a program to simulate an ATM machine. In this program a main menu will be displayed, giving the
CSC 15 Project #4 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 O boolean active //set to false by default +Account) //sets all the instance variables to the default values +Account (int id, double balance, String name)/creates an account with the given info getid): id +getBalancel: balance// returns the balance +getName): name setid(int id): void +setName(String name): void +setActive(boolean b): void setBalance(double b): void +activate Account(): void // sets the active variable to true +deactivateAccount): void //set the active variable to false close):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 +equals(Account a): boolean // two accounts are equal if their id's are equal toString(): String // create a string representation that is easy to read and has the id, name, amount
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
