Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

the above BankAccount class, what is the output of the following program?//Test

ID: 3573847 • Letter: T

Question

the above BankAccount class, what is the output of the following program?//Test class BankAccount. public class TestBankAccount {public static void main (string[] arge) {BankAccount acct1 = new BankAccount ("Amy", 1000.0); System.out.print ln (acct1.getBalance ()); BankAccount acct2 = new BankAccount ("Mike", 550.00); System.out.println (acct2. getBalance ()); acct1.withdraw(250.00); acct2.withdraw(250.00)j acct2.deposit(250.00); System.out.println (acct1. getBalance ()); System.out.println (acct2.getBalance ()); acct1.deposit(100.00); acct1.deposit(50.00); acct1.deposit(100.00); acct2.withdraw(50.0); acct2.deposit(250.00); System.out.println (acct1.getBalance getBalance ()); System.out.println(acct1); System.out.println (acct1.getBalance ()); System.out.println(acct2);

Explanation / Answer

1st printf statement output =1000//initial deposit

2nd printf statement output =550//Initial deposit

3rd printf statement output =750 //withdrawal of rs 250 was done

4th printf statement output =550//withdrawal of 250 and then deposit of 250.so same balance

5nd printf statement output =1000//depossit of 100,50 and finally 100 separately)

last printf statement output =750//withdrawal of 50 and deposit of 250