Question: Complete the following tasks in Java within the lab time using NetBeans. (JAVA) Create a class called Circle and has 1 instance variable, 1 class

Complete the following tasks in Java within the lab time using NetBeans. (JAVA)
Create a class called Circle and has 1 instance variable, 1 class variable declared as final and one object
radius as a Double
PI as Static, Final and Double
centerPoint as an object consisting of x and y
Your class should have a constructor that take the radius and centerPoint information. Your constructor should assign the values and create the centerPoint object (by calling its class constructor) .
provide a set and a get method for each instant variable
provide cloning method (override clone() method or create a copy constructor ), explain which cloning will you choose (Deep or shallow) and why
create a method area that computes and returns area of a circle.
provide JavaDoc documentation
Create centerPoint class that consists of two instance variables
X as Double
Y as Double
provide a constructor for this class that takes x and y information
provide a set and a get method for each instant variable
provide cloning method (override clone() method or create a copy constructor), explain which cloning will you choose (Deep or shallow) and why
Write a class called TestCircle with a main method in this method you will create an array that consists of 3 objects of class circle, one of these circles must be a clone is a clone.
Generate Java Doc , print circles information, then set the radius of the cloned circle to a new value and print information.

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!