Question: Walking / Step Counter Part B Use Visual Studio to create a C# Windows Forms App ( . NET Framework ) C# Desktop program /

Walking/Step Counter Part B Use Visual Studio to create a C# Windows Forms App (.NET Framework)
C# Desktop program / application based on the input and output requested in part 1A above. Compare the results of your
program by testing the same input in the Part 1B program, to the Part 1A spreadsheet, to see if Part 1A and Part 1B result
in the same output. For a given input number of steps input, the output should calculate to the same numbers for the
C# program and the Spreadsheet. Be sure to refer to the general programming guidelines listed above.
Name your project: CalcValidation - Your Name
INPUT / Data Entry as Textbox Control
- Number of Steps Walked (see part 1A above)
Processing/Output
Add a Button called Calculate
When the Button is clicked, Calculate and Display the following OUTPUT as Label Controls:
- Distance Walked in Miles (see part 1A above)
- Time Spent in Minutes (see part 1A above)
- Calories Burned (see part 1A above)
(see part 1A above for assumptions - for any assumption used in a calculation, create a constant in your C# code)
- add a calculation to output how many steps you would have to walk, to burn the number of calories in your favorite fast food
item; for example if McDonaldsTM French Fries are 300 calories; you can calculate that it would take 6,000 steps to burn the
300 french fry calories based on the assumptions above (display the name of the item, its calories, and the calculated steps)
Validate the data entered:
- use a C# try {...} catch {....} within your code to validate that the form text box/input has valid numeric data entered
into it by the user
- in your code, the try {} will contain, within its braces, whatever your code is that takes the user input from the forms
textbox and converts it into a numeric variable
- in your code, the catch {} should display a message using MessageBox.Show(Your error message here); and then
add a return; within the catch, to return control to the For

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!