CS 1400 Lab #7: Implementing The Wagon Wheel Odometer
The objective of this assignment is to let you create a working program from pseudo-code.
The early pioneers came up with a system to measure how far they traveled each day using a system of cogs and wheels. Knowing the diameter of the wagon wheel, and measuring how many times the wheel turned, they were able to calculate how far they traveled each day. In this project you are to design a Graphical User Interface program that allows the user to enter in a wheel diameter in inches, and then displays the number of turns required for the wheel to travel one mile.
You should design your own user interface. It does not need to look like the one shown here, but it should at least provide the following:
Writing The Program
Start Visual Studio and open up the project that you write for lab #6. You should have written pseudo-code for the event handlers required to make this program work. I have one for tabbing out of the top TextBox and one for the clicking on the Button. Using your pseudo-code as a starting point add the code for each step that you have outlined in your pseudo-code. Each line of pseudo-code should be followed by the code that executes that step. Put blank lines in between steps to make your code more readable.
Testing Your Program
After writing the code for each event handler, build and run your code. Pick some numbers for the diameter of the wagon wheel and see if your program calculates the correct number of turns. When you are satisfied that your program works correctly, save all of your files and submit your lab to Canvas. Your program should be completely documented and contain no magic numbers. Submit your project using the instructions outlined in the Course Syllabus, Programming Projects section.
When you submit your program, add a comment to your submission that provides the answers to the following two questions:
Question #1: Given a wheel diameter of 24 inches, what will the circumference of the wheel be?
Question #2: Write a statement in C# that computes the circumference of a wheel, given its diameter in inches. Let the diameter be stored in a variable named diam. Store the circumference in a variable named circ. Do not use any magic numbers in your statement.
File(s) to Submit:
Place your complete project folder into
a zip file and name the zip file