JAVA  Create a UML using the UML Template attached. (This is part I need most)  In this lab, you will be creating a roulette wheel. The pockets are numbered from 0 to 36.  The colors of the pockets are as follows: Pocket 0 is green.  For pockets 1 through 10, the odd-numbered pockets are red and the even-numbered pockets are black. For pockets 11 through 18, the odd-numbered pockets are black and the even-numbered pockets are red. For pockets 19 through 28, the odd-numbered pockets

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 5RQ
icon
Related questions
Question

JAVA 

Create a UML using the UML Template attached. (This is part I need most)

 In this lab, you will be creating a roulette wheel. The pockets are numbered from 0 to 36.  The colors of the pockets are as follows:

  • Pocket 0 is green. 
  • For pockets 1 through 10, the odd-numbered pockets are red and the even-numbered pockets are black.
  • For pockets 11 through 18, the odd-numbered pockets are black and the even-numbered pockets are red.
  • For pockets 19 through 28, the odd-numbered pockets are red and the even-numbered pockets are black.
  • For pockets 29 through 36, the odd-numbered pockets are black and the even-numbered pockets are red.

Create a class named RoulettePocket. The class's constructor should accept a pocket number. The class should have a method named getPocketColor that returns the pocket's color, as a string.  

 

CLASS NAME
List the instance
variables in the
constructor.
List the methods in the
class.
- indicates private
CLASS NAME
List the instance
variables in the
constructor.
List the methods in the
class.
The second row of the UML diagram lists the instance variables in the constructor. For example
-name: string
o
o name is the variable name
o string is the data type of name
+ indicates public
o getName is the method name
o
o string is the return data type
Java.util.
The third row of the diagram lists the methods in the class. For example,
+getName(): string
empty parenthesie indicate nothing is sent to the method.
Transcribed Image Text:CLASS NAME List the instance variables in the constructor. List the methods in the class. - indicates private CLASS NAME List the instance variables in the constructor. List the methods in the class. The second row of the UML diagram lists the instance variables in the constructor. For example -name: string o o name is the variable name o string is the data type of name + indicates public o getName is the method name o o string is the return data type Java.util. The third row of the diagram lists the methods in the class. For example, +getName(): string empty parenthesie indicate nothing is sent to the method.
Expert Solution
steps

Step by step

Solved in 2 steps with 6 images

Blurred answer
Knowledge Booster
Developing computer interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,