Question: CS110: Programming Assignment #3, Cooperating Classes, Due 3/30/2018 Topics: classes, programs using multiple classes, stdDraw (graphics) This program uses a publicly available drawing library created

 CS110: Programming Assignment #3, Cooperating Classes, Due 3/30/2018 Topics: classes, programs
using multiple classes, stdDraw (graphics) This program uses a publicly available drawing

CS110: Programming Assignment #3, Cooperating Classes, Due 3/30/2018 Topics: classes, programs using multiple classes, stdDraw (graphics) This program uses a publicly available drawing library created by Robert Sedgewick and Kevin Wayne to simplify the process of drawing graphic objects to the computer screen. Documentation for the class can be found at: https:/lintrocs.cs.princeton.edu/iava/stdlib/javadoc/StdDraw.html The class can be down loaded at: https://introcs.cs.princeton.edu/java/stdlib/StdDraw.java la an ed rs.arincsion duiaaitdliStabras.lava To begin download and place Stddraw.java in your project directory. NOTE: To make class Color available at the top of each class you must import: import java.awt. Part 1. (20 points) Write a class Cirete java similar to store information about a circle that has the attributes: . two double data members to store the x and y coordinates of the center of the circle - radius: double variable to store the radius of the circle. e color - the color of the circle, using one of the predefined constants in the StdDraw package, the data type of this datamember must be Color. The class should have a constructor that takes as parameters the two coordinates ,radius, and color of the circle. public Circle (double inputx, double inputY, double radius, Color color ) The class should also have the following methods: public void draw0 - for drawing the circle. (Uses the method StdDraw.filledCircle) public void setColor(Color newColor)- method that changes the color of the circle. public void setRadius( double rad)- method receives a new value for the radius of the circle

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!