Ask Question, Ask an Expert

+1-415-315-9853

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

Develop an application in java to accept the number of

Develop an application in Java to accept the number of students in a section for a subject and for each student accept the student number, Student name, prelim marks, midterm marks, final marks. The final grade should be ...

Student class and driverthis student class will be the data

"Student Class and Driver" This Student Class will be the data that will be used for each of the projects assigned and graded this semester. Your Student Class will consist of: Student Attributes: First Name Last Name ID ...

Animal characteristicsin todays fast-paced world it is

Animal characteristics In today's fast-paced world, it is important for programmers to think about potential future changes that impact their programs. One way that software developers can address this concern is by desi ...

Part 1 text readingchapter 3 chapter 4 part 2 textbook

Part 1. Text reading Chapter 3, Chapter 4 Part 2 . Textbook questions Chapter 3. Describe why an application developer might choose to run over TCP rather than UDP. Suppose host A is sending host B a large file over a TC ...

As we have discussed in class section 41 of our text

As we have discussed in class, section 4.1 of our text develops a List ADT and then offers two different implementations of it in the classes AList and LList. The ADT is defined in a Java interface file List.java, and bo ...

Question 1 illustrate that the nodes of any avl tree t can

Question 1. Illustrate that the nodes of any AVL tree T can be colored "red" and "black" so that T becomes a red-black tree. Question 2. Illustrate that via AVL single rotation, any binary search tree T1 can be transform ...

Code reviewcan some have this done immediatelypublic class

Code Review Can some have this done immediately public class BankAccount { private double balance; public BankAccount() { balance = 0; } public BankAccount(double initialBalance) { balance = initialBalance; } public void ...

Java programmingyou have been asked by your manager to

Java programming You have been asked by your manager to create a user-friendly application that will present a survey to your customers. The application will compile and analyze the results entered by the survey responde ...

Write two java program by netbeans1 create a program that

Write two java program by Netbeans. 1. Create a program that ask for a radius of a circle and has the ability to return both the Area and Circumference - so methods call getArea() and getCircumferance() 2. Create a progr ...

Pogramming assignmentmickeymouse- x int- y int- size

Programming Assignment MickeyMouse - x : int - y : int - size : int -color: Color + MickeyMouse(): + setLocation (x: int, y: int): void + setSize (size: int): void + setColor(color: Color):void + draw(canvas: Graphics2D) ...

  • 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

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate