Write program to test class-compute next month-s interest

Assignment Help Programming Languages
Reference no: EM1370381

Create class SavingsAccount.

a. 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.

b. Provide method calculateMonthlyInterest to calculate the monthly interest by multiplying the savingsBalance by annualInterestRate divided by 12-this interest should be added to savingsBalance.

c. Provide a static method modifyInterestRate that sets the annualInterestRate to a new value.

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 and print the new balances for both savers. Then set the annualInterestRate to 5%, calculate the next month's interest and print the new balances for both savers.

Reference no: EM1370381

Questions Cloud

Staffing factors : What are some of the "staffing factors" that could be contributing to this problem and how would you determine if it is in fact a training problem.
Question on labor economics : Suppose a firm is operating in perfectly competitive product market where the price of its output can be sold at the price p=$10. The firm can hire any number of workers at the wage of W=$50.
Determine effective rate on installment loans : The Dade Corporation is borrowing $300,000 for one year and paying $27,000 in interest to Miami National Bank. The Bank Requires a 20% compensating balance.
Explain about expert systems : find how an expert system can help improve our current maintenance issues being faced in our facility today.
Write program to test class-compute next month-s interest : Write the program to test class SavingsAccount. Instantiate two savingsAccount objects, saver1 and saver2, with balances of $2000.00 and $3000.00, respectively. Compute next month's interest and print new balances for both savers.
Explain the actual wages and salaries for the month : Explain The actual wages and salaries for the month was $19,980 and The activity variance for wages and salaries in May would be closest to-
Preferential treatment of veterans : Preferential Treatment of Veterans - Should disabled veterans get preferential treatment over better qualified candidates who are not disabled veterans?
Question about depreciation methods : Central Med Medical Clinic recently bought an Electec model 1555 mobile CT Scanner for $225,000. Typically CMMC depreciates their medical machine over a 3 year life,
Criteria for select jobs : United States as they appear to be in the United Kingdom? If so, if you were mentoring one of these people at work, what three specific bits of career advice would you give to him or her?

Reviews

Write a Review

Programming Languages Questions & Answers

  Scripting language programming in perl

course Scripting Language Programming,  Assignment   -  Perl,  ? Your coding style should conform to general Perl coding conventions. Your scripts should be clean, neat, and well-formatted (e.g. indention). Identifiers should also be properly name..

  Use two-dimensional array in javascript to solve problem

Using javascript. Use a two-dimensional array to solve the following problem: A company has four salespeople (1 to 4) who sell five different products (1 to 5).

  Program to compute person earns in a month

Write a program that calculates how much a person earns in a month if the salary is one penny the first day, two pennies the second day, four pennies the third day.

  Computing return value after execution of program

Compute return value of Antony after its execution?

  Program to create professor rating class

Write down program to create Professor Rating class comprising of professor ID and three ratings. Three ratings are utilized to estimate easiness.

  Design recursive program to generate random blurbs

A Whoozit is the character 'x' followed by zero or more 'y's. A Whatzit is a 'q' followed by either a 'z' or a 'd', followed by a Whoozit. Design and implement a recursive program that generates random Blurbs in this alien language.

  Write application to use random-number to create sentences

Write an application that uses random-number generation to create sentences. Use four arrays of strings called article, noun, verb and preposition.

  Explaining object hierarchy in object-oriented programming

Study the concept of inheritance and the object hierarchy in object-oriented programming, and write a paper comparing these concepts with the concept of inheritence.

  Pseudocode to create thread-safe countdownevent by locks

Write pseudocode to implement a thread-safe CountdownEvent using locks and condition variables by implementing the following methods (lists 4 methods) and then "implement a Barrier using a CountdownEvent.

  Write program to assist in monitoring gasoline supply

Write program to assist in monitoring gasoline supply in refinery storage tank. Your program must alert supervisor when supply of gasoline in the tank falls below 10% of the tank's

  Find number values that are between given range

Suppose the values from aaa.txt have been loaded into array Bob: find out the number values in Bob that are between 0 and 4 (not inclusive).

  Write an application to calculate the factorials

Write an application that calculates the factorials of 1 through 20. use type long. Display the results in tabular format. What difficulty might prevent you from calculating the factorial of 100?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd