Menu

(Solved) : Created Two Classes Bankaccountt Class Class Bankaccount Constructor Accountno Balance Acc Q35161366 . . .

I have created these two classes

///////// BankAccountt Class \\

class BankAccount { constructor(accountNo , balance ){ this.accountNo = accountNo ; this.balance = balance; } deposit(amount){ this.BankAccount.balance += amount; } withdraw(amount){ this.BankAccount.balance -= amount; } toString() { return this.accountNo + ” has QR” + this.balance; }}module.exports = BankAccount ;

///////// SavingAccount Class \\

let SavingAccount = require(‘./SavingAccount ‘);class SavingAccount extends BankAccount { constructor(minBalance ,accountNo , balance){ super(accountNo , balance ); this.minBalance = nminBalance ; } distributeBenefit(benefitPercentage){ this.balance += (this.balance * benefitPercentage) } toString() { return ” Saving Account # ” + this.accountNo+ ” has QR ” + this.balance ; }}module.exports = SavingAccount ;

///////// \\

How can I test savingAccount in app.js using this table and usea minimum balance of 500 for all accounts.

Expert Answer


Answer to Created Two Classes Bankaccountt Class Class Bankaccount Constructor Accountno Balance Acc Q35161366 . . .

OR