CS 1400 Lab #19: Making a Dice Game
The objective of this lab is to help you understand how to write code that validates input, and uses loops together with branches and random numbers. You designed a solution to this problem in the last lab.
For this assignment, you will be writing a program that simulates rolling a pair of dice. Your program will perform the following steps:
Deriving the Solution
You should have developed the design for this program in lab #18.
Writing the Code
Start Visual Studio and start the project you created for lab #18. Now, fill in the C# code that will implement The pseudo-code that you wrote in lab #18. Notice how your pseudo-code now serves as documentation for your code. It makes it easier for others to understand how your program works.
When you submit this lab, add some comments to your submission to answer the following questions:
(1) Given a Random Number generator object named "joe", write the statement you would use to generate a random number between 5 and 10, inclusive.
(2) What is the best kind of loop to use when writing a loop that gets input from the user and tests it to make sure the input is a valid response. If the response is not valid, code in the loop will display an error message and ask the user to enter his or her input again.
File(s) to Submit:
Place your complete project folder in a zip file and name the zip file lab_19_your-initials_V1.0.zip. For example, I would name my file lab_19_RKD_V1.0.zip. Submit this assignment as Lab #19 on Canvas.