Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I could use assistance with the program below. I am required to organize my code

ID: 639457 • Letter: I

Question

I could use assistance with the program below. I am required to organize my code per the instructions below, and the output must be EXACTLY the same as the sample. This particular assignment requires two seperate files, which I have struggled with more than anything else in this class. Any help would be greatly appreciated

The file must be called <YourNameChapter13.java> (driver program)
FiLiSavingsAccount.java (handles interest and balance calculations)
(FiLi = First Initial Last Initial)
Example: YourNameChapter13.java (driver program)
KDSavingsAccount.java
Ensure you include ALL files required to make your program compile and run.
I would like to see your .java files only.
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%

Overall Requirements
Write a program that establishes two savings accounts with saver1 having account
number 10002 with an initial balance of $2,000, and saver2 having account 10003
with an initial balance of $3,000. Set a common rate of interest at 5% per year. At the
end of each month, update the balance by adding one month

Explanation / Answer

import java.util.*;
class FiLiSavingsAccount
{
private double annualInterestRate;
private int ACCOUNT_NUMBER;
private double balance;
public FiLiSavingsAccount(int ac,double b)
{
ACCOUNT_NUMBER = ac;
balance = b;
}
public int get_account_number()
{
return ACCOUNT_NUMBER;
}
public double get_balance()
{
return balance;
}
public void addMonthlyInterest()
{
balance = balance + (balance * annualInterestRate / 12);
}
public void set_annual_interest_rate(double anr)
{
annualInterestRate = anr;
}
}

public class YourNameChapter13
{
public static void main(String[] args)
{
FiLiSavingsAccount saver1 = new FiLiSavingsAccount(10002,2000);
saver1.set_annual_interest_rate(0.05);
FiLiSavingsAccount saver2 = new FiLiSavingsAccount(10003,3000);
saver2.set_annual_interest_rate(0.05);
System.out.println("Monthly balances for one year with 0.05 annual interest: ");
System.out.println("Month Account # Balance Account # Balance ");
System.out.println("-------- ------------- ----------- ------------- -----------");
System.out.printf(" %2d   %d    %.2f   %d    %.2f",0,saver1.get_account_number(),saver1.get_balance(),saver2.get_account_number(),saver2.get_balance());
for(int i=1; i<13; i++)
{
saver1.addMonthlyInterest();
saver2.addMonthlyInterest();
System.out.printf(" %2d   %d    %.2f   %d    %.2f",i,saver1.get_account_number(),saver1.get_balance(),saver2.get_account_number(),saver2.get_balance());
}
System.out.printf(" Final balance of both accounts combined: %.2f",(saver1.get_balance() + saver2.get_balance()));
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote