Solved

Assume the Method Below Has Been Added to the BankAccount

Question 34

Multiple Choice

Assume the method below has been added to the BankAccount class. public void giveBonus ()
{
Balance = balance + 5.0;
}
What will be output from the following statements that use the revised BankAccount class?
BankAccount premiumAccount = new BankAccount (100) ;
PremiumAccount.giveBonus () ;
PremiumAccount.giveBonus () ;
PremiumAccount.giveBonus () ;
System.out.println (premiumAccount.getBalance() ) ;


A) 110.0
B) 100.0
C) 105.0
D) 115.0

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions