Question: Overlapping Circles Purpose Demonstrate your command of arrays and JavaFX drawing techniques. Instructions/Design Write a JavaFX application - CircleOverlap.java - that presents 50 circles (use
Overlapping Circles
Purpose Demonstrate your command of arrays and JavaFX drawing techniques.
Instructions/Design
Write a JavaFX application - CircleOverlap.java - that presents 50 circles (use the JavaFX Circle class), each with a random radius and location. If a circle does not overlap any other circle, fill the circle with a Color of your choice (I used black but you don't have to). Fill overlapping circles with a translucent blue (alpha value of 0.3).
In addition, ensure the entire circle appears in the visible area of the Scene (no circle should go off the edge).
Additional requirement: If you click on a circle, it, and any overlapping circles, should be highlighted by showing a red border.
Note 1: start() and main() and onClick() are the only methods required.
Note 2: Use an array or ArrayList to store the Circle objects, and check each new circle to see if it overlaps any previously created circle.
Reminder 1: Two circles overlap if the distance between their center points is less than the sum of their radii.
Reminder 2: The distance between two points (x1,y1) and (x2,y2) on a flat surface is:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
