• 100% Satisfaction Guarantee

LogicPro, Engineer
Category: Homework
Satisfied Customers: 11993
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
29751445
LogicPro is online now

# For LogicPro onlyWrite a program that establishes two savings

### Resolved Question:

For LogicPro only

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’s interest to the balance, so that the balance compounds monthly. Print an output that displays the month number and the account number and the balance for each of the two accounts. Use month 0 to display the initial balances, month 1 to display the balances after the first month’s interest, and so on. At the end of the year, display the total balance for both accounts combined, like this:

Output:

Monthly balances for one year with 0.05 annual interest:

Month Account # Balance Account # Balance
----- --------- ------- --------- -------
0 10002 2000.00 10003 3000.00
1 10002 2008.33 10003 3012.50
2 10002 2016.70 10003 3025.05
3 10002 2025.10 10003 3037.66
4 10002 2033.54 10003 3050.31
5 10002 2042.02 10003 3063.02
6 10002 2050.52 10003 3075.79
7 10002 2059.07 10003 3088.60
8 10002 2067.65 10003 3101.47
9 10002 2076.26 10003 3114.39
10 10002 2084.91 10003 3127.37
11 10002 2093.60 10003 3140.40
12 10002 2102.32 10003 3153.49

Final balance of both accounts combined: 5255.81

Use two classes, a SavingsAccount class and a YourNameProg4 as your Driver class.

In the SavingsAccount class, declare a class variable called annualInterestRate, an instance constant called ACCOUNT_NUMBER, and an instance variable called balance. Provide a two-parameter constructor to initialize the instance constant and instance variable, and provide accessors for the instance constant and instance variable. Provide an addMonthlyInterest method to update the balance, by adding (balance * annualInterestRate / 12) to the current balance.

You are also required to provide a class method that sets the annual interest rate

In the YourNameProg4 Driver class, instantiate the saver1 and saver2 objects. Set the annual interest rate at 0.05. Print the table heading lines. Use a for loop to print the initial account numbers and balances and the account numbers and balances each month after that month’s interest has been added. After the last month’s printout, compute and display the total of both balances.

Your driver should generate the following outputs:

Output:

Monthly balances for one year with 0.05 annual interest:

Month Account # Balance Account # Balance
----- --------- ------- --------- -------
0 10002 2000.00 10003 3000.00
1 10002 2008.33 10003 3012.50
2 10002 2016.70 10003 3025.05
3 10002 2025.10 10003 3037.66
4 10002 2033.54 10003 3050.31
5 10002 2042.02 10003 3063.02
6 10002 2050.52 10003 3075.79
7 10002 2059.07 10003 3088.60
8 10002 2067.65 10003 3101.47
9 10002 2076.26 10003 3114.39
10 10002 2084.91 10003 3127.37
11 10002 2093.60 10003 3140.40
12 10002 2102.32 10003 3153.49

Final balance of both accounts combined: 5255.81
Submitted: 2 years ago.
Category: Homework
Expert:  Angela--Mod replied 2 years ago.

Hello, I am a moderator for this topic. I sent your requested professional a message to follow up with you here, when they are back online. If I can help further, please let me know, otherwise, no need to reply. Thank you for your patience.

Expert:  LogicPro replied 2 years ago.

You need to spend \$3 to view this post. Add Funds to your account and buy credits.
LogicPro, Engineer
Category: Homework
Satisfied Customers: 11993
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

### What Customers are Saying:

• Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Previous | Next >
• Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
• This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
• Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
• I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
• Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
• Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
• He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX

• ### LogicPro

#### Satisfied Customers:

4925
Expert in Java C++ C C# VB Javascript Design SQL HTML
< Last | Next >

### LogicPro

#### Satisfied Customers:

4925
Expert in Java C++ C C# VB Javascript Design SQL HTML

### Manal Elkhoshkhany

#### Satisfied Customers:

4538
More than 5000 online tutoring sessions.

### Linda_us

#### Satisfied Customers:

3138
Post Graduate Diploma in Management (MBA)

### Chris M.

#### Satisfied Customers:

2602
Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

### F. Naz

#### Satisfied Customers:

2126
Experience with chartered accountancy

### Bizhelp

#### Satisfied Customers:

1887
Bachelors Degree and CPA with Accounting work experience