Unit 4 Chapter 13 AssignmentGrading Information:?This Program isdueonDate Specified.Comments are?REQUIRED; flow charts and pseudocode are?NOT REQUIRED.
Directions
Points
The filesmust be called <LiFiUnit4Ch13.java>The filesmust be called <LiFiUnit4Ch13Inevstor.java>(LiFi=?LastInitial?FirstInitial)
Proper coding conventions required the first letter of the class start with a capitalletter and the first letter of each additional word start with a capital letter.
Only submit the .javafilesneeded to make the program run. Do not submit the.classfilesor any other files.
5%
Style Components
Include properly formatted prologue, comments, indenting, and other style elementsas shown in Chapter 2 starting page 64 and Appendix 5 page 881-892.
5%
Topics covered in chapter
Topics with * are covered in this assignment.
*Composition and Aggregation*Inheritance*Constructors in a SubclassMethod Overriding*Final Access Modifier
Basic Requirements
Write a program that?tracks an investment for 1 person based on the input of an interest rate.The initial balance should be $2,000. The interest should be added to the balance and outputin table format as shown in the supplied?sample.
LiFiUnit4Ch13.java
oInstantiate an investor1 objectusing a two parameter constructorpassing the account number 1001 and the initial balance of $2,000oGet input for interest rate(in the format .08 for 8%)oOutput header as per sample showing interest rateoPrint the table using a for loop displaying the current month and?calling:?getBalance() to display the current balance(See sample)
45%
?addInterest() to add the monthly interest for each iteration
Sample output is provided below. Be sure to mimic it exactly except for values willchange based on the interest rate entered.
LiFiUnit4Ch13Investor.java
oDeclare a?classvariable called interestRate (This will hold the annualinterest rate)oDeclare a constant called ACCOUNT_NUMBERoDeclare an instance variable called balanceoProvide a class method that will be used to set the annual interest rateoProvide a two parameter constructor to initialize the constant accountnumber and balanceoProvide an addInterest() method to update the balance based on theinterestRate entered in the driver
?Add the interest using (balance * interestRate / 12)
45%
NOTE: Complete your activity and submit it?by clicking “Submit Assignment”Total Percentage
100%
Sample
Your output?will vary based on?interest rate entered. Thesamples below are correct when using .05 and .08 interestrates.
Unit 4 Chapter 13 Assignment
Grading Information: This Program is due on Date Specified.
Comments are REQUIRED; flow charts and pseudocode are NOT REQUIRED.
Directions
Points
The files must be called <LiFiUnit4Ch13.java>
The files must be called <LiFiUnit4Ch13Inevstor.java>
(LiFi = Last Initial First Initial)
Proper coding conventions required the first letter of the class start with a capital
letter and the first letter of each additional word start with a capital letter.
5%
Only submit the .java files needed to make the program run. Do not submit the
.class files or any other files.
Style Components
Include properly formatted prologue, comments, indenting, and other style elements
as shown in Chapter 2 starting page 64 and Appendix 5 page 881-892.
5%
Topics covered in chapter
Topics with * are covered in this assignment.
*Composition and Aggregation
*Inheritance
*Constructors in a Subclass
Method Overriding
*Final Access Modifier
Basic Requirements
Write a program that tracks an investment for 1 person based on the input of an interest rate.
The initial balance should be $2,000. The interest should be added to the balance and output
in table format as shown in the supplied sample.
LiFiUnit4Ch13.java
o Instantiate an investor1 object using a two parameter constructor
passing the account number 1001 and the initial balance of $2,000
o Get input for interest rate (in the format .08 for 8%)
o Output header as per sample showing interest rate
o Print the table using a for loop displaying the current month and calling:
getBalance() to display the current balance (See sample)
45%
addInterest() to add the monthly interest for each iteration
Sample output is provided below. Be sure to mimic it exactly except for values will
change based on the interest rate entered.
LiFiUnit4Ch13Investor.java
o Declare a class variable called interestRate (This will hold the annual
interest rate)
o Declare a constant called ACCOUNT_NUMBER
o Declare an instance variable called balance
o Provide a class method that will be used to set the annual interest rate
o Provide a two parameter constructor to initialize the constant account
number and balance
o Provide an addInterest() method to update the balance based on the
interestRate entered in the driver
Add the interest using (balance * interestRate / 12)
45%
NOTE: Complete your activity and submit it by clicking ?Submit Assignment?
Total Percentage
Sample
Your output will vary based on interest rate entered. The
samples below are correct when using .05 and .08 interest
rates.
100%