Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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

Java, Programming

  • Category:- Java
  • Reference No.:- M91490

Have any Question?


Related Questions in Java

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Part a specification - robot simulationpart a

PART A Specification - Robot Simulation PART A Requirements To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Assignment - java program using array of objectsobjectives

Assignment - JAVA Program using array of objects Objectives - This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details - For this assignment, you are required to develop a Menu ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As