Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C# code - How to build a program that computes future value and checks for format exceptions. When this program runs, user types four fvalues:

C# code - How to build a program that computes future value and checks for format exceptions.

When this program runs, user types four fvalues: initial investment, interest rate in the ext boxes next to First set of values and Second set of values.

When the user clicks the button "Fill Manximum and Minimum Values the following should happen:

First your program should check each of the four values the user entered whether they are correct numbers; if not you should catch the FormatException. If all of the numbers are in correct format, your program should check whether each of them is greater than zero. If any of the numbers is less than or equal to zero, your code showd throw an exception.

Second your code should compute the maximum of the two investment values and place them in the investment textbox next to Maximum Values. Similarly the minimum of the two investment values should be placed in the investment textbo next to Minimum VAlues. Repeat this exercise to compute and fill the minimum and maximum interest rates.

3. When the user clicks the button "Compute Future VAlue in Ten Years with Maximum Values" the following should happen:

Compute the future value of the investment in Ten years using the Maximum Values for initial investment and interest rate. Fill the textbox next to Future VAlue with Maximum VAlues. (Try Catch)

4. When the user clicks the button Compute Future Value in Ten Years with Minimum VAlues the following should happen:

Compute the future value of the investment in Ten years using the minimum values for initial investment and interest rate. Fill the textbox next to Future VAlue with Minimum Values

5. Code method CalculateFutureVAlue with three input parameters: int years, decimal investment, decimal rate. This method should return a decimal number with future value. Modify the button click method in items (3) and (4) above to use this CalculateFutureValue method.

image text in transcribed

FutureValue Initial Investment Interest Rate First Set of Values: Second Set of Values Maximum Values Minimum Values: Fill Maximum and Minimum Values Future Value with Maximum Values: Future Value with Minimum Values: Compute Future Value in Ten Years with Maximum Compute Future Value in Ten Years with Minimum Exit

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

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions

Question

Question May a taxpayer roll over money from an IRA to an HSA?

Answered: 1 week ago

Question

Question What is the doughnut hole in HSA coverage?

Answered: 1 week ago