Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1](10points) Write a fully dressed use case that captures the behavior of the di

ID: 3851254 • Letter: 1

Question

1](10points)

Write a fully dressed use case that captures the behavior of the dice game Skunk.This is a variant of Pig, which itself is an instance of a "press your luck" or "

jeopardy" dice game. Here are some links:https: //boardgamegeek.com/boardgame/3425/skunk https://en.wikipedia.org/wiki/Pig_(dice_game)

The rules to use for your use case are taken from a 1950's commercial box version sold by the Minneapolis company Schaper Manufacturing. See the next page for the detailed rules (taken from the box). Assume that you are implementing a computer program to allow two or more human players to play Skunk against one an

other, with the computer keeping score and enforcing the rules of the game. As in HW 2, imitate the fully dressed template used in the detailed use case example of Larman in

Chapter 6 (starting on p. 68 of paper copy; copy also posted). However, only include the following sections: Primary Actor, Preconditions, Success Guarantee, Main Success Scenario, and Extensions.

Unlike HW2's use cases, you should describe both Extension conditions and their handlers within your use case.That means you should write the "mini" use cases that describe how to handle each Extension condition.

[2](10 points)

Create a Domain Class Diagram (DoCD) that captures theconceptual details and associations of the Skunk game, as described above.You don't need to capture the behavioral details of the rules of the game-just the important concepts and their names that allow the rules to be described.

Use Violet UML or some other tool to draw your DoCD, then save it as an image and insert into your answers document.

Some suggestions:Review Larman's Chapter 9, as well as the posted slides for Lecture 4. Each domain class should include its name and attributes, although attribute types can be omitted.

Avoid reference attributes: those that duplicate an association's information. Remember that in a DoCD that we do not include operations.

Associations should be labeled with a descriptive name, along with some kind of indicator as towhich direction to read the association.

Be sure to include explicit multiplicities at both ends of every association. Association role names are not necessary.

Generalization (DoCD version of 'inheritance') maybe used,but try firstwithoutit.

Remember: there is no one single correct DoCD for any domain. However, a DoCD that captures/represents more useful relevant information about a domain will be more useful than one that describes less. Rules of Skunk DIRECTIONS FOR PLAYING The object of the game is to accumulate a score of 100 points or more. A score is made by rolling the dice and combining the points on the two dice. For example: A 4 and 5 would be 9 points -if the player decides to take another roll of the dice and turns up a 3 and 5 (8 points), he would then have an accumulated total of 17 points for the two rolls. The player has the privilege of continuing to shake to increase his score or of passing the dice to wait for the next series, thus preventing the possibility of rolling a Skunk and losing his score.

PENALTIES:A skunk in any series voids the score for that series only and draws a penalty of 1 chip placed in the "kitty," and loss of dice. A skunk and a deuce voids the score for that series only and draws a penalty of 2 chips placed in the "kitty," and loss of dice.TWO skunks void the ENTIRE accumulated score and draws a penalty of 4 chips placed in the "kitty," and loss of dice. Player must again start to score from scratch. Any number can play.[Assume at least two players!] The suggested number

of chips to start is 50.There are sufficient chips in the box to allow 8 players to start with 50 chips by placing a par value of "one" on white chips, 5 for 1 on red chips and 10

for 1 on the blue chips. The first player to accumulate a total of 100 or more points can continueto score as many points over 100 as he believes is needed to win. When he

decides to stop, his total score is the “goal.” Each succeeding player receives one more chance to better the goal and end the game.The winner of each game collects all chips in "kitty" and in addition five chips from each losing player or 10 chips from any player without a score.

10:18 PM LT 26% OO Sprint 3G Undo Analysis and Design HW 3: Skunk Use Case and Domain Model Out 6/17/17 Due Class 7.624/17 20 points You may work by yourself, or with one other student on this assignment. in Adobe's PDF (pdf Submit an electronic document format. Name your uploaded document follows: ANShrehlast1tlast2.adf where lastN is your last name or its first five characters. 0 point) Write a fully dressed use case that captures the behavior of thedice game SAunk. This is a variant of Pig, which itself is an instance of a press your lck" or Tjeopardy" dice game. Here are some links: https:Llboardgamegeek.com Aboardgane/3425Lskunk /wiki/Pi The rules to use for your use case are taken from a 950s commercial box vensian sold by the inneapolis company Schapst Manufacturing. See the next page for the detailed rules taken the box). Assume that you are implementing acomputer program to allow two or more human players to play Skunk against another, with the computer keeping scene and enforcing the rules ofthe game. As in HW 2. imitate te fully dressed template used in the detailed use case example of Chapter 6 (starting on p. 68 of paper copy copy also posted). However, only include the following sections: Primary Actor, Preconditions. Success Guarantee, Main Succes Scenarie, and Exlensions Unlike HW 2s use cases, you should describe both Extension conditions and hundkrs within your use case. That means you should write the "mini" use cases that describe how handle each Extension point) Create Domain Claes Diagram(DoCD)thar caprare the caneupraal details and the SAwnk game, as descried above. You danl need to capture the behavieraldetails of the rules of the game just the important concepts and their names that allow the rules to be described. Use Violet UMLor some other tool to draw your DoCD.then save it as an image and insert into your Some suggestions: Eric V. Level, Review lamana Chapter as well as the posted slides for Lecture 4. Each domain class should include its name and attributes, although attribute types can be omimod. reference attributes: those that duplicate an association'sinformation. Remember that in a DoCD that we do wer include operations. Associations should be labeled with a descriptive name, along with some kind ofindicator which direction to read the association. Be sure to include explicit muliplicities atbothends of every association. Association role names are nor necessary.

Explanation / Answer

dices code;

#include <stdlib.h>
#include <time.h>

main() {

   int rollADie1, rollADie2, totalDice, key = 0, key2 = 0, end = 0;
   srand(time(NULL));

   do
   {
       rollADie1 = rand() % 6 + 1; // in the range of 1 - 6
       rollADie2 = rand() % 6 + 1; // in the range of 1 - 6

       printf("Dice #1 is %i ", rollADie1);
       printf("Dice #2 is %i ", rollADie2);

       totalDice = rollADie1 + rollADie2;
       printf("The total of both dice is %i ", totalDice);

       switch (totalDice) {
       case 2:
           end = 2;
           break;
       case 3:
           end = 3;
           break;
       case 4:
           key = 4;
           break;
       case 5:
           key = 5;
           break;
       case 6:
           key = 6;
           break;
       case 7:
           end = 7;
           break;
       case 8:
           key = 8;
           break;
       case 9:
           key = 9;
           break;
       case 10:
           key = 10;
           break;
       case 11:
           end = 11;
           break;
       case 12:
           end = 12;
           break;
       }
   } while (totalDice != key);

   do
   {
       rollADie1 = rand() % 6 + 1; // in the range of 1 - 6
       rollADie2 = rand() % 6 + 1; // in the range of 1 - 6

       printf("Dice #1 is %i ", rollADie1);
       printf("Dice #2 is %i ", rollADie2);

       totalDice = rollADie1 + rollADie2;
       printf("The total of both dice is %i ", totalDice);

       switch (totalDice) {
       case 2:
           printf("Roll Again ");
           key2 = 2;
           break;
       case 3:
           printf("Roll Again ");
           key2 = 3;
           break;
       case 4:
           key = 4;
           break;
       case 5:
           key = 5;
           break;
       case 6:
           key = 6;
           break;
       case 7:
           printf("You Win ");
           break;
       case 8:
           key = 8;
           break;
       case 9:
           key = 9;
           break;
       case 10:
           key = 10;
           break;
       case 11:
           printf("Roll Again ");
           key2 = 11;
           break;
       case 12:
           printf("Roll Again ");
           key2 = 12;
           break;
       }
   } while (totalDice == key2);

   if (totalDice == 7) {
       printf("You are the Winner ");
   }
   else
   {
       if (totalDice == key);
       printf("You are a Loser ");
   }


   printf("Thank you for Playing ");

   system("pause");
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote