Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA PROGRAMMING Please help with this programming question involving, Composition and Aggregation, Inheritance, and Constructors in a Subclass. Please make sure it compiles in java.

image text in transcribed

JAVA PROGRAMMING

Please help with this programming question involving, Composition and Aggregation, Inheritance, and Constructors in a Subclass. Please make sure it compiles in java. The files must be called LIFIUnit4Ch13java and LIFIUnit4Ch13investorjava Basic Requirements: Write two programs 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. LiFiUnit4Ch13java o Instantiate an investor1 object using a two parameter constructor passing the account number 1001 and the initial balance of $2,000 oGet input for interest rate (in the format .08 for 8%) o Output header as per sample showing interest rate Print the table using a for loop displaying the current month and calling: D getBalance) to display the current balance (see sample) 45%-addi nterest0 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 addlnterest) method to update the balance based on the interestRate entered in the driver Add the interest using (balance interestRate /12)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

LO4 Provide an overview of four challenges facing HR today.

Answered: 1 week ago