Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Recommended Textbook for

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions

Question

To find integral of sin(logx) .

Answered: 1 week ago

Question

What is Centrifugation?

Answered: 1 week ago

Question

To find integral of ?a 2 - x 2

Answered: 1 week ago

Question

To find integral of e 3x sin4x

Answered: 1 week ago

Question

To find the integral of 3x/(x - 1)(x - 2)(x - 3)

Answered: 1 week ago

Question

How do we organise for international logistics?

Answered: 1 week ago