Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hey I need help with some java coding :D on a roulette wheel, the pockets are numbered from 0 to 36. The colors of the

Hey I need help with some java coding :D image text in transcribed

on 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 29, the odd numbered pockets are red and the even numbered packets are black. -for pockets 29 through 36, the odd numbered pockets are black and the even numbered packets are red Write 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 -Demonstrate the class in a program that asks the user to enter a pocket number, and displays whether the pocket is green, red, or black. the program should display an error message if the user enteres a number that is outside the range of 0 through 36 write it as a JOptionpane use lots of comments

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions

Question

=+j Describe an effective crisis management program.

Answered: 1 week ago