Question: Sample Problem Calling Class Account Class: a. Account myaccount public class Account b. int Balance 100; nt amount= int txncoun myacct- new Account(X);public Account 0

Sample Problem Calling Class Account Class: a. Account myaccount public class Account b. int Balance 100; nt amount= int txncoun myacct- new Account("X");public Account 0 t d. myacct.debit (200); e. myacctcredit(300); 1. What would be the final value of txncount = 0 Balance in the calling class? 2. If line c were myacct new Account0;, public Account (String letter) t what would be the final value of txncount-3; g. Balance- mvacct.getBalancel); Balance in the calling class? 3. What is actually stored at the memory public void debit (int inamt) amount = amount + inamt; wn count += 1; location referenced by "myaccount"? 4. Could I debit an account for 44.50? Why or Why not? 5. Assuming the entire Account class is oid credit (int inamt) t amount= amount -inamt; txncount +=1; shown.would "Balance" be a property? Why or Why not? Should a setBalance method be included in the class? public void discount ()f if (txncount> 4) {amount = amount/2)) public int getBalance()f return amount
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
