Which three lines, when inserted independently at line …

Given the following class:

And given the following main method, located in another class:

Which three lines, when inserted independently at line n1, cause the program to print a 0 balance?

Given the following class:

And given the following main method, located in another class:

Which three lines, when inserted independently at line n1, cause the program to print a 0 balance?

A.
this.amount = 0;

B.
amount = 0;

C.
acct (0) ;

D.
acct.amount = 0;

E.
acct. getAmount () = 0;

F.
acct.changeAmount(0);

G.
acct.changeAmount(-acct.amount);

H.
acct.changeAmount(-acct.getAmount());



Leave a Reply 3

Your email address will not be published. Required fields are marked *


Maxtor

Maxtor

Test D,G,H

renko

renko

Answer indeed D, G. H