Question: THIS IS JAVA. PLEASE PLEASE PLEASE FOLLOW ALL DIRECTIONS. THANK YOU. Program #9: BankAccount & Subclasses Assigned date: Due Date: Concepts: Classes and objects, inheritance




THIS IS JAVA. PLEASE PLEASE PLEASE FOLLOW ALL DIRECTIONS. THANK YOU.
Program #9: BankAccount & Subclasses Assigned date: Due Date: Concepts: Classes and objects, inheritance Point value: 100 points You will write (or include) 4 classes for Program 9 ONE FILE The name of the physical program file submitted will be xxxx Program9, where xxxx is your Kean email id. The assignment will be started in class but should be completed independently and submitted by the due date for full credit Assignment: The BankAccount class is very similar to the Account class we used in Program 6. 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: One constructor that receives the initial balance withdraw subtract money from the balance deposit - add money to the balance Getters for o Account id o Balance o Date created toString prints the object in the following format: Account ID: 1 Balance: 2020.0 Date Created Wed Mar 29 12:21:05 EDT 2017 The differences between a BankAccount and the Account class from Program 6, is that a BankAccount has no interest rate instance variable, only one constructor, and no getInterest or addInterest methods The SavingsAccount class models a bank account that is meant for long term savings and earns interest. A SavingsAccount is-a BankAccount. It is a sub-class of (i.e., it extends) BankAccount, and inherits all the fields and methods of the BankAccount class (these are inherited, not rewritten!). 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
