Question
Chapter 5 Control Structures Lab / Program 2 Download and unzip up the Chapter05 Control Structures zip file from D2L. The zip file has two
Chapter 5 Control Structures Lab / Program 2
Download and unzip up the Chapter05 Control Structures zip file from D2L. The zip file has two separate projects; part 1 is on the if statement, part 2 is on the while and for statements.
Part 1
The screen shot to the right shows the output of the button click method from part 1 based on the values in the textbox and checkbox. The part 1 project in the zip file has the form, and a start to the button click method (variable declarations and aTryParse).
The button click event method also has commented-out VB code from an MIS 221 textbook example on the if statement to show how the message in the label is determined (using nested if statements). Your job is to make this program work by re-writing the commented-out VB code using C# so that it works properly. The logic for what the method does should be apparent from examining the commented-out VB code.
Part 2
The following form (and button click methods) is based on two different examples from the MIS 221 text.
The first button click method uses a while loop to determine how many years it would take for an initial deposit to grow into $1,000,000 at the specified annual interest rate (annual compounding only). You can see the output of this in the screenshot on the left side for an initial deposit of $10,000 earning interest at an annual rate of 12% (.12)
The second button click method uses a for loop to compute the balance in the account after 10 years (assuming the initial deposit and specified interest rate)
Similar part 1, each button click method gives you the C# code for variable declarations and TryParses. Your job is to take the commented-out VB code and rewrite it using C# so that it works properly. Again the logic should be apparent from examining the VB Code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started