473,386 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

CircleXY Class

Hi ,
I try to solve this question, but I have difficulty to solve sub question for this problem
The question is to use the PointXY class that I wrote before to write a class in java that represents the circles in 2 dimensions. A circle can be represented as one point, radius, and color. The name of the class must be: CircleXY. I solve class constructor for this class, I Wrote a getter and a setter method for the each data member , I Wrote the toString method and Wrote a method in which I compute and returns the area and perimeter of the circle , but I don’t understand these questions
1. Given a point v, write a method in which it checks whether v lies inside the circle or not.
2. Reuse the method in 1 to check if a point lies on the circumference of the circle or not.
3. Reuse both methods in 1 and 2 to check if a point lies outside the circle or not. And also I don’t understand how to use getter to print circle they gave.( i implement these code in Bluej)
Oct 9 '07 #1
1 1123
r035198x
13,262 8TB
Hi ,
I try to solve this question, but I have difficulty to solve sub question for this problem
The question is to use the PointXY class that I wrote before to write a class in java that represents the circles in 2 dimensions. A circle can be represented as one point, radius, and color. The name of the class must be: CircleXY. I solve class constructor for this class, I Wrote a getter and a setter method for the each data member , I Wrote the toString method and Wrote a method in which I compute and returns the area and perimeter of the circle , but I don’t understand these questions
1. Given a point v, write a method in which it checks whether v lies inside the circle or not.
2. Reuse the method in 1 to check if a point lies on the circumference of the circle or not.
3. Reuse both methods in 1 and 2 to check if a point lies outside the circle or not. And also I don’t understand how to use getter to print circle they gave.( i implement these code in Bluej)
How would you do these problems manually?You just need to convert the formulas into java methods.
Oct 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Fernando Rodriguez | last post by:
Hi, I need to traverse the methods defined in a class and its superclasses. This is the code I'm using: # An instance of class B should be able to check all the methods defined in B #and A,...
1
by: Oplec | last post by:
Hi, I'm learning C++ as a hobby using The C++ Programming Language : Special Edition by Bjarne Stroustrup. I'm working on chpater 13 exercises that deal with templates. Exercise 13.9 asks for me...
9
by: Banaticus Bart | last post by:
I wrote an abstract base class from which I've derived a few other classes. I'd like to create a base class array where each element is an instance of a derived object. I can create a base class...
5
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.