Question: 4A: Creating a Bank Account Create an object named Account and an OuterMain class to instantiate and operate a bank account. The Account class Account
4A: Creating a Bank Account Create an object named Account and an OuterMain class to instantiate and operate a bank account. The Account class Account - accountName: int - customerName: Stri - balance: double + Account(aName: int, cName: String, initialDeposit: double) + setCustomerName(name: String): void + deposit(amount: double): void + withdraw(amount: double): boolean + getAccountName(): int + getCustomerName(): String +getBalance(0: double The constructor will initialize the customer's name, account type, and balance by arguments withdraw method should FIRST check if there is enough balance for withdrawing or not. * * The OuterMain class 1. Ask for customer's name and then instantiate a checking account and a saving account for the same customer. Deposit some money to them. Transfer some money from checking account to saving account. 2. 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
