Question: Pred. A simple banking system In this problem you are gone to create a simplement monding to the pichUM Besides the teen die . Chelsea

 Pred. A simple banking system In this problem you are gone
to create a simplement monding to the pichUM Besides the teen die
. Chelsea malutele .dll me where as powerful wat hence de deposited
with cond de the yowly public class Bank Manager public static void
printoverallInfo{BankAccount[] accounts) { 1/to de 1 public static void rewardAll(BankAccount accounts) W/to

Pred. A simple banking system In this problem you are gone to create a simplement monding to the pichUM Besides the teen die . Chelsea malutele .dll me where as powerful wat hence de deposited with cond de the yowly public class Bank Manager public static void printoverallInfo{BankAccount[] accounts) { 1/to de 1 public static void rewardAll(BankAccount accounts) W/to do 1 public static void depositAll YearlyInterests(Bankkccount() accounts > And my public class Tester public static void main(Strinellang) BankAccount accounts - new Bank Account: accounts - new Savings Account("486e3.5.6.12) accounts[1] - new Bank Account("67725", 18875.) accounts[2SavingAccount (10. 1575.5, 603) accounts(3) new CheckingAccount(54, 2475) accounts[4] .hew Checking Account ("F8733, 3455.5): accountsisi-new Savings Account("18229, 24058.25 8.25) System.out.println("The overall info of the accounts Sally) Bank Manager.printoveral info accounts: System.out.println("\tewarding all the account) Bank Manager reward(accounts) System.out.println("positing the interest to all sont : SavingAccount COFR Song, www Sang She prin vor All of method which receive as input a polymorphic array of bank accounts and will print the information about all accounts specifying the accounttype, id, balance and other additional attributes if applicable rewardAtl method which recebe as input a polymorphic array of bank accounts and will deposit a rewand on all account according to the following policy each saving account will be rewarded 50 dollars cach checking account will be rewarded 75 dollars each general account will be rewarded 25 dollars depositAlly early interests method which will receive as input a polymorphic array of bank accounts and will deposit the yearly interest to all saving accounts (no operations will be done on accounts which are not saving accounts) public class BankManager public static void printoverallInfo(BankAccount() accounts){ //to do } public static void rewardAll(BankAccount[] accounts) // to do ) public static void depositAllvearlyInterests (BankAccount accounts) //to do } As a tester class you may use the following one public class Tester { public static void main(String[] args) { BankAccount[] accounts new BankAccount [6]; accounts[] = new Savings Account("04051", 6503.5, 0.82); accounts[1] = new BankAccount("G7725", 18875.e); accounts[2] = new Savings Account("1605", 15794.5, 0.83); accounts [3] = new CheckingAccount("E5964", 9624.75); accounts[4] = new CheckingAccount("F8723", 3455.5); accounts [5] = new SavingsAccount("L8219", 24850.25, e.025); System.out.println("The overall info of the accounts initially:"); BankManager.printoveral Info(accounts); System.out.println("InRewarding all the accounts...); BankManager.rewardAll(accounts); /o output is printed System.out.println(" Depositing the interest to all saving accounts ..."); Bank Manager.depositALLYearlyInterests(accounts); // no output System.out.println(" The overall info of the accounts at the end of operations:"); BankManager.printoverall Info(accounts); Problem 4 - A simple banking system (25 points) In this problem you are going to create a simple model of a banking system based on inheritance and polymorphism, according to the specifications in the given UML diagram. Besides the three classes given in the diagram, you are going to create also a BankManager class which will provide three static methods: BankAccount -accountID: String wbalance: double -Bank Account(id: String balance double) gerBalance: double depositamount double) withdraw: void -getinfo: String SavingsAccount Checking Account transaction Fee: double -yearlyInterestRate transactions Number: int SavingsAccount(d: String, balance: double, interest: double) deposit Yeartyinterest -ChedengAccountrid: String balance: double) -set TransactionFeetee: double) -getInfo(): String payCheck amount double) getinfo : String printOverAllInfo method which receive as input a polymorphic array of bank accounts and will print the information about all accounts specifying the account type, id, balance and other additional attributes if applicable. reward All method which receive as input a polymorphic array of bank accounts and will at deposit a reward on all account according to the following policy: each saving account will be rewarded 50 dollars cach checking account will be rewarded 75 dollars o each general account will be rewarded 25 dollars depositAll Yearlyinterests method which will receive as input a polymorphic array of bank accounts and will deposit the yearly interest to all saving accounts (no operations will be done on accounts which are not saving accounts). public class BankManager { public static void printoverallInfo(BankAccount[] accounts) { //to do } public static void rewardA11(BankAccount[] accounts){ //to do } public static void depositAllYearlyInterests (BankAccount[] accounts) { //to do } As a tester class you may use the following one: public class Tester { public static void main(String[] args) { BankAccount[] accounts = new BankAccount [6]; accounts[@] = new SavingsAccount("D4051", 6503.5, 0.02); accounts[1] = new BankAccount("G7725", 10875.0); accounts[2] = new Savings Account("K1605", 15794.5, 0.03); accounts (3) = new CheckingAccount("E5964", 9624.75); accounts[4] = new CheckingAccount("F8723", 3455.5); accounts[5] = new SavingsAccount("L8219", 24050.25, 0.025); System.out.println("The overall info of the accounts initially:"); BankManager.printoverallInfo(accounts); System.out.println(" Rewarding all the accounts..."); BankManager.rewardALL(accounts); /o output is printed System.out.println(" Depositing the interest to all saving accounts ..."); BankManager.depositAllYearlyInterests (accounts); /o output System.out.println(" The overall info of the accounts at the end of operations:"); BankManager.printoverall Info(accounts); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!