Question: In Java language Program that Create a game, which displays three circles that have the same color (any color besides yellow and black). Only one
In Java language
Program that Create a game, which displays three circles that have the same color (any color besides yellow and black). Only one of the circles turns into a yellow rock when it is clicked. The one that turns yellow is the one that holds the gold. Behind each circle is an object of type Rock. A Rock object has an attribute for color that is set to black. A subclass of Rock (called GoldRock) has color yellow/gold assigned to it. Write a tester class that gives user chances to click on the circle that holds the gold. When a circle is clicked on, the color of it's associated Rock object will be displayed. let user replay game and say game over.
rock class
goldrock class
tester class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
