Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code: class BankTester public static void main(String[] args)throws NameEx //change this to match your exception { //modify the name object calls to match your Name
Code:
class BankTester public static void main(String[] args)throws NameEx //change this to match your exception { //modify the name object calls to match your Name class. BankAccount[] ba=new BankAccount[6]; ba[0]=new CheckingAccount(new Name("Zack","Lawerence"),100); ba[1]=new SavingsAccount(new Name("Abigail","Tara","Smith"),500); ba[2]=new SavingsAccount(new Name("Mary","Adams"),10000); ba[3]=new CheckingAccount(new Name("Sara","t","brown"),607); ba[4]=new CheckingAccount(new Name("Adam","Michael","Smith"),25); ba[5]=new SavingsAccount(new Name("sara","t","brown"),6700); print(ba); System.out.println(" "); sort(ba); print(ba); } public static void print(BankAccount[] a) { for(int i=0;i2. Use BankTester.java to modify the code. You will make BankAccount an abstract class and then fill in Checking Account and SavingsAccount classes. See code for comments. You will then add in a sort method to sort BankAccounts based on the Name attributes. This may take some thought and more than one try to get working. 2. Use BankTester.java to modify the code. You will make BankAccount an abstract class and then fill in Checking Account and SavingsAccount classes. See code for comments. You will then add in a sort method to sort BankAccounts based on the Name attributes. This may take some thought and more than one try to get working
Step 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