CS 1400 Lab #18: Designing 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.
For this assignment, you will be desiging a program that simulates rolling a pair of dice. You will not actually write the program at this point. Your program will perform the following steps:
Deriving the Solution
This program is an application of the things that you have studied in this lab. To begin, Fill out the Algorithm Design Worksheet. Draw an Activity Diagram that describes the steps outlined above and write the pseudo-code for this program as you have learned to do in previous labs.
Writing the Pseudo-Code
Start Visual Studio and create a new console project. Call it lab18. Copy the line-by line description of your program from the Algorithm Design Worksheet to your new project. Mark each line of pseudo-code as a comment. Your pseudo-code must be complete and describe the loops and decisons required to make your program work.
When you submit your lab, write down the answers to the following two questions as comments to your submission.
(1) Suppose that in your dice game you let the user roll the dice exactly ten times. What kind of loop would you use in this case?
(2) Suppose that in your dice game, you let the user keep rolling the dice until a seven was rolled. What kind of loop would you use in this case?
File(s) to Submit:
Place your complete project folder in zip file and name the zip file lab_18_your-initials_V1.0.zip. For example, I would name my file lab_18_RKD_V1.0.zip. Submit this assignment as Lab #18 on Canvas. Please do not include any other files in your submission.