Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS 152 Programming Assignment #5 Due: Saturday March 16, 2019 Goal: Write a JavaFX Application that draws a row of random circles. Create a class

image text in transcribed
CS 152 Programming Assignment #5 Due: Saturday March 16, 2019 Goal: Write a JavaFX Application that draws a row of random circles. Create a class Randcircle that extends the class circle of JavaFX. Randcircle has all the methods of circle (by inheritance) but now adds the methods setRandomFi11 setRandomstroke ) and setRandomRadius( double min, double max) to randomly pick a Color for the fill and stroke and picks a random radius in the range min to max. For this, it is OK to randomly pick a value 0 255 for each of red, green, and blue. You will need a constructor for this class. Randcircle( double centerx, double centerY, double radius) Use super( to use one of circle's constructors. This must be the first line of a child's constructor, so the radius the constructor gives to a Randcircle is not random. Have only this one constructor. Later in the code, the radius can be randomly picked (or not.) Create an Application that draws a picture with N RandCircles in a row. Make N an easily- changed value and base the location of the RandCircles and the size of the Scene on it You will likely create a Group as the root of the scene graph. Of course, if all you wanted was this particular picture you could do it by using methods of Circle alone and not by creating a new class. But the real purpose of this assignment is to practice inheritance, so create the Randcircle class as a child of circle. You will need a driver program that creates and displays the scene graph. Start programs with a brief documentation header that says what it is, who did it, and when. BlueJ gives you some of this automatically, but you have to fill in some things. Also, include some line-by-line documentation that says what is going on. What to turn in: The Java source files only. Don't turn in the entire BlueJ project

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

Students also viewed these Databases questions

Question

Identify the five styles of handling conflict.

Answered: 1 week ago