Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Beginner in C#. Our book is Murach's 2015. I need the code for this GUI provided. We need to code functions and call them as

image text in transcribed

Beginner in C#. Our book is Murach's 2015. I need the code for this GUI provided. We need to code functions and call them as well. Please don't use Arrays as we have not covered that and please leave comments helping me understand. Please refer to the following:

Need to write a program that calculates the present value for a future investment goal, future value for an investment made today, or monthly payment for a fixed-rate loan.

The formula for each of these values are listed below;

FV= future value PV = present value MP= Monthly Loan Payment IR = yearly or monthly interest rate as a decimal Terms = number of years or months, NP = number of monthly payments LA = loan amount

Remember to convert the interest rate to a decimal percent (IR * .01 or IR/100) and for the monthly payment also convert the interest rate to a monthly value (IR/12 * .01 or IR/12/100)

FV = PV * (1 + IR) ^ Terms Note: Terms = Years

PV = FV / (1 + IR) ^ Terms Note: Terms = Years

MP = LA * (IR*( 1+IR) ^ NP) / ((1 + IR) ^ NP -1) Note: NP = Years * 12

The Future Value function should use the following: FV = PV * (1 + IR) ^ Terms Note: Terms = Years private decimal CalcFutureValue(decimal presentValue, decimal yearIntRate , int yrs ) { decimal futureValue = 0m; decimal iRate = yearIntRate * .01m; for (int i = 0; i

Each calculation must be done with a function. Each function must use an argument list. Limited form level variables. All validation must be done with functions. Each function must accept a textbox and return a Boolean result. o All entries must be present - Refer to IsPresent o All entries must be numeric - Refer to IsDecimal o Range validation one function Present, Future and Loan amounts should be greater than 0 and no more than 1,000,000. Interest Rate must be a value greater than 0 and less than or equal to 18. (allow the user to enter 5 and convert to 5%) Years must be an integer no less than 1 and no greater than 30. o Entry errors must be reported to the user and focus returned to the textbox in error for that view. o The tag property for each textbox must be used to format an appropriate error message. Note the Hot Keys on the form The Calculate buttons: o Create a function to validate the user entry Edit the data from the textboxes in that group - see example on page 207 o If valid, perform calculation function o Format the result as currency o Select the text and return focus to the first textbox in the group The Clear button o Should clear all data on the form (entry and result textboxes/labels) o Focus should be placed in the present value textbox The Summary button will report the following in a messagebox to the user: o Current Date and time o Program name o Number of transactions (calculations) processed The Exit button o Should exit the application o Allow the user to use Alt + X to exit or to use the escape key to exit.

I hope this isn't too much information. Im pretty confused and appreciate the help. Our textbook is Murach's C# 2015. Please make as simple as possible and please leave good comments with each line of code to help me understand.

Investment and Payment Calculator Clear Summary Exit Name your Investment Compang Investment Value (Future Value) Present Value nterest Rate (APR) Years: investment Value (Present Value) Loan Payment Loan Amount: Future Value Interest Rate (APR Years: nterest Rate (APRJ OR OR Years: Future Value Monthly Payament Present Value: Calculate FV Calculate PV Calculate MP

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

Step: 3

blur-text-image

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions