Complete the following program to demostrate use of local variables. Will amount remain same? (Yes or No) and why? 1. public class CheckingAct { private String actNum; private String nameOnAct;...



Complete the following program to demostrate use of local variables.



Will amount remain same? (Yes or No) and why?


1.


public class CheckingAct


{


  private String actNum;


  private String nameOnAct;


  private int    balance;


  . . . .


  public void processDeposit( int amount )


  {


    balance = balance + amount ;


  }



  // modified toString() method


  public String toString()


  {


    return  "Account: " + actNum + "\tName: " + nameOnAct +


            "\tBalance: " +  amount ;


  }


}



Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here