The BankAccount class models an account of a customer. A BankAccount has the followinginstance variables: A unique account id sequentially assigned when the Bank Account is created. A balance which represents the amount of money in the account A date created which is the date on which the account is created.The following methods are defined in the BankAccount class: Withdraw – subtract money from the balance Deposit – add money to the balance Inquiry on:o Balanceo Account ido Date createdThe SavingsAccount class models a bank account which is meant for long term savingsand earns interest. It inherits all the fields and methods of the BankAccount class. TheSavingsAccount class has an additional instance variable, interest rate. The interest rate is adecimal representing the rate at which the account earns interest. For example, an interestrate of .01 means that the account will earn 1% interest on its balance.The following additional methods are defined in the SavingsAccount class: Calculate interest – returns the result of calculating the interest amount based on thecurrent balance and interest rate. It does not update the balance Inquiry on interest rate. Modifying the interest rate.The CheckingAccount class models a bank account which is used to write checks andmake frequent ATM deposits and withdrawals. This type of account does not earn interest.The CheckingAccount class inherits all the fields and methods of the BankAccount class. Ithas an additional instance variable, monthly fee. The monthly fee is an amount of moneycharged by the bank for its services.The following additional methods are defined in the CheckingAccount class: Deduct monthly fee – updates the balance by deducting the monthly fee Inquiry on monthly fee. Modifying the monthly fee.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 11PE
icon
Related questions
Question

The BankAccount class models an account of a customer. A BankAccount has the following
instance variables:
 A unique account id sequentially assigned when the Bank Account is created.
 A balance which represents the amount of money in the account
 A date created which is the date on which the account is created.
The following methods are defined in the BankAccount class:
 Withdraw – subtract money from the balance
 Deposit – add money to the balance
 Inquiry on:
o Balance
o Account id
o Date created
The SavingsAccount class models a bank account which is meant for long term savings
and earns interest. It inherits all the fields and methods of the BankAccount class. The
SavingsAccount class has an additional instance variable, interest rate. The interest rate is a
decimal representing the rate at which the account earns interest. For example, an interest
rate of .01 means that the account will earn 1% interest on its balance.
The following additional methods are defined in the SavingsAccount class:
 Calculate interest – returns the result of calculating the interest amount based on the
current balance and interest rate. It does not update the balance
 Inquiry on interest rate.
 Modifying the interest rate.
The CheckingAccount class models a bank account which is used to write checks and
make frequent ATM deposits and withdrawals. This type of account does not earn interest.
The CheckingAccount class inherits all the fields and methods of the BankAccount class. It
has an additional instance variable, monthly fee. The monthly fee is an amount of money
charged by the bank for its services.
The following additional methods are defined in the CheckingAccount class:
 Deduct monthly fee – updates the balance by deducting the monthly fee
 Inquiry on monthly fee.
 Modifying the monthly fee.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT