Question: I want to modify the codes. For the output to be true Accont: ArrayEmception: Bank: BankTest: DuplicateException: MyArray: MyArrayImpl: OutOfSpaceException: This is the photo so







I want to modify the codes. For the output to be true




![Account [id=89, name=uuu, balance=9089.0] Id: 100 Account [id=95, name=ggg, balance=5643. 0] Name:](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66d6a930e61d9_04866d6a9307f094.jpg)
![Irr Account [id=100, name=rrr, balance=5689.0] Balance: 5689 Account [id=150, name=ddd, balance=7654.0] Done](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66d6a93173ea0_04966d6a93117223.jpg)






![Enter Account Information: : Account [id=95, name=ggg, balance=5643.0] Id: 89 Welcome to](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66d6a9358b3d3_05366d6a9352ece5.jpg)
Account: public String tostring() f \} return "Account [ id ="+ id + ", name =" + name + ", balance=" + balance + " ]"; public boolean equals (Object other) \{ \} return this.id ==(( Account ) other )getI(); Qoverride public int compareTo(Account o) \{ I/ TODo Auto-generated method stub if(this.id > o.id) if(this.id >0. return 1; else if(this.id 1 Enter Option (1..5)> 4 Enter Account Information : : Account [id=89, name=uuu, balance=9089.0] Id: 100 Account [id=95, name=ggg, balance=5643. 0] Name: Irr Account [id=100, name=rrr, balance=5689.0] Balance: 5689 Account [id=150, name=ddd, balance=7654.0] Done Welcome to MyBank Welcome to MyBank Press 1 to add an account Press 1 to add an account Press 2 to find an account Press 2 to find an account Press 3 to delete an account Press 3 to delete an account Press 4 to list all accounts Press 4 to list all accounts Press 5 to exit Press 5 to exit Enter Option(1.5)>2 Enter Option (1.5)>1 Enter id to search =95 Enter Account Information: : Account [id=95, name=ggg, balance=5643.0] Id: 89 Welcome to MyBank Name: uuu Press 1 to add an account Balance: 9089 Press 2 to find an account Done Press 3 to delete an account Welcome to MyBank Press 4 to list all accounts Press 1 to add an account Press 5 to exit Press 2 to find an account Enter Option (1..5)>2 Press 3 to delete an account Enter id to search =900 Press 4 to list all accounts Invalid Account ID Press 5 to exit Welcome to MyBank Enter Option (1.5)>1 Press 1 to add an account Enter Account Information : : Press 2 to find an account Id: 150 Press 3 to delete an account Name: ddd Press 4 to list all accounts Balance: 7654 Press 5 to exit Done Enter Option (1.5)>3 Welcome to MyBank Enter id to search =100 Press 1 to add an account. Account is deleted Press 2 to find an account Welcome to MyBank Press 3 to delete an account Press 1 to add an account Press 4 to list all accounts Press 2 to find an account Press 5 to exit Press 3 to delete an account Enter Option (1.5)>1 Press 4 to list all accounts Enter Account Information : : Press 5 to exit Id: 95 Enter Option (1..5) >4 Name: ggg Account [id=89, name=uuu, balance=9089.0] Balance: 5643 Account [id=95, name=ggg, balance=5643.0] Done Account [id=150, name=ddd, balance=7654.0] D module-info.java D Fractionjava D Fractionlmpljava A Fractiontestjava A Accountjava Account.ja backage arraylab; D module-info... D Account.java D Account.java 2 ArrayEmptyE... Mank.java A 1 package arraylab; Project Run Window Help A ArrayEmptyE.. A Bankjava A BankTestjava A DuplicateEx AMyArayjawa MyArraylmpl. x "; eOverride public boolean delete( T value)throws ArrayEmptyException \{ if(isempty ()) throw new ArrayEmptyException("Array is Empty"); int index = find(value); if ( index =1) return false; else\{ for(int i= index; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
