In each of the two classes, the initializers have already been defined for you.
Methods in the Account class
In line 7, we have defined the withdrawal(amount) method. It takes a number, amount, as an input parameter and subtracts it from the balance.
In line 11, we have defined the deposit(amount) method. It takes a number, amount, as an input parameter and adds it to the balance.
In line 15, we have defined the getBalance() method that returns the value of balance.
Methods in the SavingsAccount class
We have defined the interestAmount() method that returns the amount of interest depending on the value of the interestRate defined at the time of the creation of the object.