CSCI 261 - Programming ConceptsSpring 2019 - Lab 4A - Yahtzee!Quick Links: Canvas | Mines | Piazza | zyBooks |
|
| Home | Contact | Syllabus | Assignments | Schedule | Resources | | |
This lab is due by Thursday, February 21, 2019, 11:59 PM. Yahtzee!For this lab, we are going to collectively implement most of a Yahtzee game. Everyone will make a small piece of
the game and we could then put all the pieces together to make a fully functioning game.
The first step to make Yahtzee is to know how to play. Here are the
official rules. With a partner,
play a game of yahtzee online. Be
sure to take note of two pieces of information each round:
After you've played at least one complete game, choose two different Yahtzee categories. One must be
from the "upper section" and one must be from the "lower section". These are:
For example, the function for the Full House category would be
structured as follows:
bool isFullHouse( int die1, int die2, int die3, int die4, int die5 ) {
// code goes here } To test that our functions are correct and can handle a variety of scenarios, we are going to use the
AutoGrader to test our functions. Note you must be connected to the Mines
network in order to access the AutoGrader website (this means you need to
use the VPN if off campus).
Once logged in, choose "CSCI 261 Programming Concepts" and this lab. You will now see a list of all the functions possible for this lab. Begin by selecting your isXYZ() function.You'll now see a brief problem statement along the left and an editor on the right. Go ahead and click the "Test" button on the bottom left. You'll see a bar appear saying "Running Tests" and then the bar will turn red with a green box. Each of these boxes represent a different test case. By hovering over a single box, you can see the input provided for that test and what the expected output is. Hover over the green box and you'll see:
Passed Test
Input: { 1, 1, 1, 2, 2 } Output: 1 Now go one box to the right and hover over the red box. This time you'll see:
Failed Test
Input: { 2, 1, 4, 5, 1 } Expected Output: 0 Your Output: true Your goal is get all the boxes to be green. Use the editor to complete the function body. When you
make an edit, click "Test" again to see if any additional tests have passed. Two very important pieces of information:
What To Turn In
Back in CLion land, create a file called main.cpp for a Lab4A project. Inside this main, copy your functions
from the AutoGrader and paste it into this file. We
do not need a main() function and full program for this lab - just the two functions. Be sure to include your
partner's name in the header of the file. Also be sure that you have pressed Submit and Save in the AutoGrader
with all tests successfully passing.
Lab SubmissionYou will submit your solution to this lab with the rest of Set4. Detailed instructions for doing this are posted in Assignment 4. This lab is due by Thursday, February 21, 2019, 11:59 PM. | |
Last Updated: 02/06/19 04:21
|