Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your task is to create a set of UML models which could be used to solve a programming problem. The case study is the card

Your task is to create a set of UML models which could be used to solve a programming problem.

The case study is the card game first described in Assessment 2 for this topic.

You should follow one of the processes described in this topic 2 to create the following diagrams: 1. Class Diagram (you may have revised your previously submitted class diagram)

2. Activity Diagram

3. Sequence Diagrams

4. State Machine Diagram Your diagrams should be incorporated into a final document Case Study This deck of cards will be used to create the card game '500'. It is not necessary to understand the detailed rules for scoring in this game, but you do need to understand how the game proceeds (see the design scope below).

A full deck of cards has 52 cards. There are 4 suits (Hearts, Diamonds, Spades and Clubs).

Each suit has cards numbered from 1 (Ace) to 10, then Jack, Queen and King. The deck for this game must include one Joker - which does not belong to any suit.

A subset of the complete deck is used to play this game, comprising of 43 cards (some of the lower value cards are left out).

To play the game, the deck is shuffled and dealt out to players as follows: each of the four players gets a hand of 10 cards, and 4 cards are left in the 'kitty'. No cards are visible until players get their hand.

Players need to be able to turn over their cards to see the value of each card. One player is allowed to swap selected cards from their hand with the kitty.

To play, each player in turn takes one card from their hand and places it on a pile (in the game this is sometimes called a 'trick').

There is a complicated scoring system to decide which player wins each 'trick'.

Design Scope For this assessment you do NOT need to model all the required processes.

The processes which should be included are:

* create the game with 4 players and the deck

* deal cards (which should create the kitty and 4 instances of a 'hand' of cards)

* play one 'trick' of a game (where each player places a card on the table, and a winner is decided). (Note that a 'round' is just a repeat of this process until all cards have been played.) Additional processes (which are NOT needed for this assessment) could involve the bidding process, tallying the score for each player, starting a new round, etc. State Machine Diagrams are not always necessary in UML modelling.

For this assessment you only need ONE State Machine Diagram.

One suggestion is that you could use a state machine to model the states of a 'deck'. Think about what happens to a deck - it can be shuffled or sorted or it may be empty (after all cards have been dealt). You should not be able to deal from a deck that is not shuffled, or is empty. As a start, this class would need the methods 'shuffle' and 'order'. You will obviously also need a class for 'card'. Although you might save time by creating a class specifically for 'Five Hundred', your classes would be more useful if they could be re-used for other card games. It will also be useful to have classes to manage the subsets of a deck. For example, a hand of cards, the kitty, and even the reduced deck used for the game are subsets of 'deck'. You will need methods to deal, shuffle and select cards. You also need methods to move cards from one group to another. Classes for game and player are an obvious requirement.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago