Question: In Java Program Create a game, which displays three circles that have the same color (any color besides yellow and black). Only one of the

In Java Program

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.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!