Question
Write a SavingsAccount class that extends the BankAccount class described below. The BankAccount class has a protected balance field, a protected accountNumber field, and the
Write a SavingsAccount class that extends the BankAccount class described below.
The BankAccount class has a protected balance field, a protected accountNumber field,
and the appropriate constructors, mutators, accessors, a method called deposit that adds an amount to the
balance and a method called withdrawal that subtracts an amount from the balance.
Write a SavingsAccount class that extends the BankAccount class. The SavingsAccount class does not
allow a withdrawal if the balance falls below $25. The SavingsAccount class has the following methods:
a) a method called withdrawal that checks if the balance is below $25, and if it is, it prints a message
specifying that a withdrawal cannot be made; if the balance is $25 or above a withdrawal is done by
calling the superclass version of the method.
b) a toString method that returns a String containing the account number and the balance.
IN JAVA
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started