Create a .java file that has class SavingsAccount. Use a static variable annualInterestRate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable savingsBalance indicating the amount the saver currently has on deposit. Provide method calculateMonthlyInterest to calculate the monthly interest by multiplying the savingsBalance by annualInterestRate divided by 12- this interest should be added to savingsBalance. Provide a static method setInterestRate that sets the annualInterestRate to a new value. There should also be a method setSavingsBalance to set the initial savings balance for a new saver or you can do it through a constructor.
Write a program to test class SavingsAccount. Instantiate two SavingsAccount objects, saver1 and saver2, with balances of $2000.00 and $3000.00, respectively. Set annualInterestRate to 4%, then calculate the monthly interest for 12 months and print the new balances for both savers. Next, set the annualInterestRate to 5%, calculate the next month's interest and print the new balances for both savers.
Put the code to test the class in the main method of the Savings Account Class. The output of your program should look like the following:

`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
class SavingsAccount {
//variable to store annual interest rate
static private double annualInterestRate;
private double savingBalance;
//constructor method
public SavingsAccount()
{
this.savingBalance=0;
}
//Constructor method
public SavingsAccount(double savingBalance)
{
this.savingBalance=savingBalance;
}
//Get saving balance
public double getSavingBalance()
{
return this.savingBalance;
}
public double[] getMonthsSavingBalance(int total_months)
{
double[] monthlyI_month=new double[total_months];
double monthlyI;
for(int i=0;i<total_months;i++)
{
monthlyI= (double)(this.savingBalance*annualInterestRate/12);
this.savingBalance+=monthlyI;
monthlyI_month[i]=this.savingBalance;
}
return monthlyI_month;
}
// Modify interest rate by setting annual interest rate to a new
value
public static void modifyInterestRate(double newInterestRate)
{
annualInterestRate=newInterestRate;
}
//Method to calculate monthly interest
public void calculateMonthlyInterest()
{
double monthlyI;
monthlyI= (double)(this.savingBalance*annualInterestRate/12);
this.savingBalance+=monthlyI;
}
}
public class TestSavingAccount {
public TestSavingAccount() {
}
public static void main(String[] args)
{
SavingsAccount saver1,saver2;
saver1 = new SavingsAccount (2000.0);
saver2 = new SavingsAccount (3000.0);
int total = 0;
SavingsAccount.modifyInterestRate (0.04);
int total_month=12; // Show Complete Balance Till 12 Month
double[] balance_month=saver1.getMonthsSavingBalance(total_month);
// I have added This Function that will calculate till which month
you want
System.out.println("Savings Account Balance");
System.out.printf("Month\tSaver1\tSaver2\n");
double[] balance_month1=saver2.getMonthsSavingBalance(12);
for(int i=0;i<total_month;i++)
{
System.out.printf("%d\t%.2f\t%.2f\n",(i+1),balance_month[i],balance_month1[i]);
}
SavingsAccount.modifyInterestRate(0.05);
balance_month=saver1.getMonthsSavingBalance(12);
balance_month1=saver2.getMonthsSavingBalance(12); // I have added
This Function that will calculate till which month you want
for(int i=0;i<total_month;i++)
{
System.out.printf("%d\t%.2f\t%.2f\n",(i+13),balance_month[i],balance_month1[i]);
}
}
}

Kindly revert for any queries
Thanks.
Create a .java file that has class SavingsAccount. Use a static variable annualInterestRate to store the...
JAVA Create a class called SavingsAccount. The class should have a static variable named, annualInterestRate, to store the annual interest rate for all account holders. Each object of the class should contain a private instance variable named, savingsBalance, indicating the amount the saver currently has on deposit. Write methods to perform the following: calculateMonthlyInterest – calculates the monthly interest by multiplying the savingsBalance by annualInterestRate divided by 12. This interest should be added to the balance. depositAmount – allows the...
Code should be in C# Create a class called SavingsAccount. Use a static variable called annualInterestRate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable savingsBalance, indicating the amount the saver currently has on deposit. Provide method CalculateMonthlyInterest to calculate the monthly interest by multiplying the savingsBalance by annualInterestRate divided by 12 – this interest should be added to savingsBalance. Provide static method setAnnualInterestRate to set the annualInterestRate to a new value....
Application should be in C# programming language
Create a class called SavingsAccount. Use a static
variable called annualInterestRate to store the annual interest
rate for all account holders. Each object of the class
contains a private instance variable savingsBalance, indicating the
amount the saver currently has on deposit. Provide method
CalculateMonthlyInterest to calculate the monthly interest by
multiplying the savingsBalance by annualInterestRate divided by 12
– this interest should be added to
savingsBalance. Provide static method
setAnnualInterestRate to set the...
Create the class savings account. Use the static variable annualInterestRate to store the annual interest rate for all account holders. Each object of the classcontains a private instance variable savingsBalance, indicating the amount the saver currently has on deposit. Provide method CalculateMonthlyInterest to calculate themonthly interest by multiplying the savingsBalance by annualInterestRate divided by 12, this interest should be added to savingsBlance, Provide static methodModifyInterestRate to set the annualInterestRate to a new value. Write an application to test class SavingsAccount....
Define a class SavingsAccount with following characteristics. Use a static variable annualInterestRate of type float to store the annual interest rate for all account holders. Private data member savingsBalance of type float indicating the amount the saver currently has on deposit. Method calculateMonthlyInterest to calculate the monthly interest as (savingsBalance * annualInterestRate / 12). After calculation, the interest should be added to savingsBalance. Static method modifyInterestRate to set annualInterestRate. Parameterized constructor with savingsBalance as an argument to set the value...
a) Create saving account Class. Use a static data member annualBonusRate to store the annual bonus rate for each of the savers (objects) b) The class contains a private data member savingBalance indicating the amount the saver currently has on deposit. c) Provide member function calculate MonthlyBonus that calculates the monthly bonus by multiplying the savingBalance by annualBonusRate divided by 12; this bonus should be addad to savingBalance. d) Provide a static member function modifyBunusRate that has a parameter and...
Using C++ Please make sure you comment each section of the program so I can better understand it. Thank you! Assignment Content You are now working for a bank, and one of your first projects consists of developing an application to manage savings accounts. Create a C++ program that does the following: Creates a SavingsAccount class Uses a static data member, annualInterestRate, to store the annual interest rate for each of the savers Ensures each member of the class contains...
Now create another class named SavingsAccount. This should be a subclass of BankAccount. A SavingsAccount should have an interest rate that is specified in its constructor. Furthermore, there should be a method, addInterest, that deposits interest into account, based on the account balance and interest rate. Create another subclass of BankAccount named CheckingAccount. A CheckingAccount should keep track of the number of transactions made (deposits and withdrawals). Name this field transactionCount. Also, the set fee for transactions is three dollars,...
IN JAVAThe code is attached below has the Account class that was designed to model a bank account. An account has the properties account number, balance, annual interest rate, and date created, and methods to deposit and withdraw funds. I need creat program using the 2 java programs.Create two subclasses for checking and savings accounts. A checking account has an overdraft limit, but a savings account cannot be overdrawn.I need to write a test program that creates objects of Account,...
In C++ Write a program that contains a BankAccount class. The BankAccount class should store the following attributes: account name account balance Make sure you use the correct access modifiers for the variables. Write get/set methods for all attributes. Write a constructor that takes two parameters. Write a default constructor. Write a method called Deposit(double) that adds the passed in amount to the balance. Write a method called Withdraw(double) that subtracts the passed in amount from the balance. Do not...