CSCI 261 - Programming Concepts (C++)Spring 2017 - Lab 07CQuick Links: Blackboard | Canvas | CS @ Mines | Cloud9 | Piazza | zyBooks |
|||||||||||||||||||||||||||||||||||||||||||
| Home | Contact | Syllabus | Assignments | Schedule | Resources | | |||||||||||||||||||||||||||||||||||||||||||
This lab is due by
Tuesday, March 14, 2017 11:59pm.
Yahtzee Scorer
Today's lab is another pair programming exercise because two heads are better than one.
Each pair will be given a bag of dice with a different Yahtzee scenario/category. If you are unfamiliar with the rules of Yahtzee, here are the official Hasbro rules (.pdf). Your task is to create two different functions for each scenario. Below are each of the 13 scenarios:
The first function will check if the scenario is present given the five
dice after they are rolled. Create a main.cpp that prompts the user to
enter the values for each of the five dice. Next write the function as
described on your card above your main function. Then call your
function, passing as arguments the five values the user entered. Print
out the result of the function to verify your function is returning the
correct value.
Once the first function is working, move on to the second function described on the card. This function will determine how many points your dice will score in the given scenario (if the scenario is present). In your program, after printing if the scenario is present or not, print out how many points the user's inputs earn. When you have both functions working, post your functions to the pinned Piazza post for this lab. We will be gathering all 26 functions for Lab07C and can easily make our own Yahtzee game! We recommend writing out some pseudocode for how you are going to solve these problems. Lab Submission
You will submit your solution to this lab with the rest of Week07.
Detailed instructions for doing this are posted in Assignment 07.
This lab is due by
Tuesday, March 14, 2017 11:59pm.
| |||||||||||||||||||||||||||||||||||||||||||
Last Updated: 01/01/70 00:00
|