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

Assignmentthis assignment will give you a chance to

Assignment This assignment will give you a chance to exercise your knowledge of extending jQuery and of multimedia players like the JWPlayer. We're building on the "divide-text-into-spans" example we started in Homework ...

Java program for profhudaneed help with java program just

Java program for Prof.Huda Need help with java program ... just apply an example how i want my assignmemt to look like . you can use the same code to do the program .. by the way i"m using JCreater .. The assignment is : ...

The requirement is to design a system using jsp in

The requirement is to design a system using jsp in netbeans. You need to add other functions such as search by text, advance search, quantity update by admin, quantity check at the checkout, login and registering page, a ...

Assignment introduction to programming using java1 write a

Assignment: Introduction to Programming Using Java 1. Write a program that uses one of the Map classes to implement a contact list. Contact information should include first name, last name, a phone number and an email ad ...

Write a jsp program that generates subtraction quizzes

Write a JSP program that generates subtraction quizzes randomly, as shown in Figure 43.14a (http://postimg.org/image/ze4uwdhqp/) . The first number must always be greater than or equal to the second number. After the use ...

Assignmentexercise1write a java class that asks the user to

Assignment Exercise#1: Write a java class that asks the user to enter three numbers N1, N2, N3 , obtains the numbers, then calculates and displays the largest number Max followed by the text "is the largest" and the smal ...

Java application - distancecalculatorcreate a java

Java Application - DistanceCalculator Create a Java application named DistanceCalculator.java to solve the following problem. An application is needed to allow a user to enter two cities and display the distances between ...

Java programmingwrite a java application using netbeans

JAVA PROGRAMMING Write a Java application using NetBeans Integrated Development Environment (IDE) that calculates the total annual compensation of a salesperson. Consider the following factors: • A salesperson will earn ...

Question awhy is it important to avoid the use of reserved

Question A Why is it important to avoid the use of reserved words as you define variables, functions, methods, or identifiers? Do you have any get-arounds to the use of these reserved words that you like to use? (max 80 ...

Exam program create a class for working with mixed

Exam Program: Create a class for working with mixed fractions. Only 3 private data members are needed: the int whole number part of the fraction, the int numerator of the fraction, and the positive int denominator of the ...

  • 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

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen