Q1. Can the following code be further improved? class CashBalance { def balance = 0.0; def initBalance(def initBalance) {this.balance = initBalance } def addCredits(def credits) {this.balance = balance + credits } def subtractDebits(def credits) {this.balance = balance – credits }…
(Visited 1 times, 1 visits today)