Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use my existing code to finish the c# program. I will leave good comment and good rating after. using System; using System.Collections.Generic; using System.Linq;

image text in transcribedimage text in transcribedimage text in transcribed

Please use my existing code to finish the c# program. I will leave good comment and good rating after.

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;

namespace LoanCalculator { public class Loan {

protected double annualInterestRate; protected int numOfYears; protected double loanAmount;

public int NumOfYears { get {return numOfYears; }

set {this.numOfYears = value; } } public double LoanAmount { get { return loanAmount; }

set { this.loanAmount = value; } }

} }

Instructions & Requirements .Rename Program.cs to LoanManager.cs. Name your other classes appropriately * Import the provided Loan.cs class provided and add it to your project. o You are allowed to change the namespace name Create additional classes to model auto loans and mortgage loans . Any class modeling a loan must inherit the Loan class. All Loan classes should have the following methods o o * * CalculateMonthlyPayment, which returns the monthly payment CalculateTotalPayment, which returns the total payment ToString() method, which returns loan information as a string You must use a List as the data structure to store multiple Loan objects . o Use a foreach loop to loop through the List. Create any additional classes as needed. Numeric Formats Interest rate: store 4.5% as 4.5, not .45. Conversion to .45 takes place in formula later Loan years: store as whole numbers without decimals. Will be converted to months later. Loan amount: store with decimal numbers. Calculation of Auto Loans The interest rates for auto loans are constant at 4.5% annually Monthly Interest Rate Annual Interest Rate 1200 Monthly Payment- amountrate +rate)periods Where rate is the Monthly Interest Rate periods 12 * Number of Years The Math class has a static method, Pow, for calculation of power. You will be able to supply it with base and exponent values Total Payment - Monthly Payment* 12 *Number of Years

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions