CS 1400 Lab 9: Writing the Farmer John Program
After completing this assignment you understand how to use pseudo-code as a tool to solve a programming problem.
Be sure that you are familiar with the slides for this week, Program Design. Study the example shown in the slides thoroughly. Be sure that you understand the steps required to design a program.
In lab #8, you started a project for the Farmer John problem. In that project, you created a source code file that contains the pseudo-code that you developed for this problem.
Writing the Program
Open the project that you created for lab #8. Now, below each line of pseudo-code that you created, fill in the C# code that will accomplish that line of pseudo-code. After you have completed all of the code, compile and run your program. Use the test values from your Algorithm Design Worksheet to test your program. You should display your answer accurately with two digits after the decimal point. When you are satisfied that your program works correctly, submit the code as explained below.
When you submit your program to Canvas, add a comment to your submission that answers the following two questions:
Question #1: C# contains a built in constant for the value of pi. Using Google, look up how to use this constant. Then write an expression that correctly uses this constant to multiply the variable radius by pi.
Question #2: Given that the diameter of a circle is stored in the variable diameter, write an expression that would calculate the area of the circle.
File(s) to Submit:
Place your complete project folder into a zip file. and name the zip file lab_09_your-initials_V1.0.zip. For example, I would name my file lab_09_RKD_V1.0.zip. Submit this assignment as Lab #9 on Canvas.