Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Define a class named Circle. A Circle object stores a radius and the (x,y) coordinates of its center point. Each circle object should have 3

Define a class named Circle. A Circle object stores a radius and the (x,y) coordinates of its center point. Each circle object should have 3 private fields. x-coordinate, y-coordinate and radius. Each circle object should have the following public methods

. Circle (x,y,radius)

. getX()

. getY()

. getRadius ()

. getArea

. getCircumference ()

. toString ()

. contains (x.y)

write a client class named CircleClient. It should create an object of class Circle and initialize it to (10.5) AND radius . Print out its circumference and area. If point (5,7) lies within the circle print"(5,7) lies within the circle" else print"(5,7) doesnot lie within he circle".

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_2

Step: 3

blur-text-image_3

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

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

What is ethics?

Answered: 1 week ago