// returns a string that states the balance of the opened acct public string handleBalanceRequest() { string ans = "error"; if (acct != null) { ans = (acct.getBalance()).ToString(); } return(ans); }
////////// Methods written for remote login and logout: // activates a login from a remote site to account #id and returns only the account's balance // (and not the account itself). If id is nonexistant/in use, returns -1 public object loginRemote(string id) { int ans = -1; IAcct a = this.login(id); if (a != null) { ans = a.getBalance(); } return(ans); }