Write a BankAccount class with an attribute for the balance.The BankAccount class should have the following methods:constructor accepts an argument for the balance
deposit accepts an argument for the amount to deposit. It should add the argument to the to the account balance.
withdraw accepts an argument for the amount to withdraw. It should subtract the argument from the account balance
Then, write a SavingsAccount class that extends the BankAccount class with an attribute to represent whether the account is active or inactiveIf the balance of the savings account falls below $25, the account becomes inactive. Once the account is inactive, no more withdrawals can be made until the balance is above $25, at which point the account becomes active again.The SavingsAccount class should have the following methods:constructor don’t forget about the superclass constructor!
withdraw determines whether the account is inactive before the withdrawal is made. If you can withdraw, do so by calling the superclass version.
deposit determines whether the account is inactive before a deposit is made. If it is and the deposit brings the balance above $25, the account becomes active again. Make the deposit by calling the superclass version
Write a driver to test your methods!