1. Engineering
  2. Computer Science
  3. 4a creating a bank account create an object named account...

Question: 4a creating a bank account create an object named account...

Question details

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 customers 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 customers 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.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution