interest rate for all account holders. Each object of the class contains a property 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 savings-Balance. Write an app to test class SavingsAccount. Create 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 display the new balances for both savers. Then set the AnnualInterestRate to 5%, calculate the next month’s interest and display the new balances for both savers.
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Need help with this exercise in C# please!! Reject if you can't.
Create the class SavingsAccount. Use the static read-write property AnnualInterestRate to store the annual interest rate for all account holders. Each object of the class contains a property 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 savings-Balance. Write an app to test class SavingsAccount. Create 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 display the new balances for both savers. Then set the AnnualInterestRate to 5%, calculate the next month’s interest and display the new balances for both savers.
Step by step
Solved in 4 steps with 3 images