Designing-coding-testing multi object application by arrays


Objectives: Design, code and test the multi-object application using arrays.

Tasks:

Elimination is a one-player game. Board consists of a set of 12 tiles, numbered 1 through 12. Player rolls a pair of dice and removes tiles based on numbers shown on the dice. For every roll, the player could remove either two tiles corresponding to the numbers shown on the dice or a single tile corresponding to the sum of the numbers on the dice. If a player rolls doubles (the similar number on both dice), the player could remove only the tile corresponding to the sum of the dice. Play continues till the player can’t make the legal move or all the tiles have been removed. Sum of the remaining tiles is the player's score. The aim is to have a low score. Here is a sample game:

1  2  3  4  5  6  7  8  9 10 11 12
.  .  .  .  .  .  .  .  .  .  .  . 
Dice roll: 4 3
What is your move (V=values, S=sum, Q=quit)? v

1  2  3  4  5  6  7  8  9 10 11 12
.  .  X  X  .  .  .  .  .  .  .  . 
Dice roll: 2 5
What is your move (V=values, S=sum, Q=quit)? v

1  2  3  4  5  6  7  8  9 10 11 12
.  X  XXX  .  .  .  .  .  .  . 
Dice roll: 6 5
What is your move (V=values, S=sum, Q=quit)? V

Try again.

What is your move (V=values, S=sum, Q=quit)? s

1  2  3  4  5  6  7  8  9 10 11 12
.  X  XXX  .  .  .  .  .  X  .
Dice roll: 4 5
What is your move (V=values, S=sum, Q=quit)? s

1  2  3  4  5  6  7  8  9 10 11 12
.  X  XXX  .  .  .  X  .X  .
Dice roll: 4 5
What is your move (V=values, S=sum, Q=quit)? s

Try again.

What is your move (V=values, S=sum, Q=quit)? v

Try again.

What is your move (V=values, S=sum, Q=quit)? q

1  2  3  4  5  6  7  8  9 10 11 12
.  X  XXX  .  .  .  X  .X  .
Score = 44

Create the following for the above requirements:

1. Create the list of nouns and noun phrases from the above Requirements Document.

2. Create Class Diagrams only for nouns and noun phrases which have significance in the Requirements Document.

3. Show the associations between the classes and any classes which are compositions or collections of other classes

4. Add Attributes to Class Diagrams created earlier.

5. Add Operations to Class Diagrams created earlier.

6. Create test cases.

1273_Test cases.jpg

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Designing-coding-testing multi object application by arrays
Reference No:- TGS01490

Expected delivery within 24 Hours