class question helping please!

In the x-y plane, the general equation of a circle of radius r is given by: (x - a)2 + (y - b)2 = r2.
Implement a Circle class. Each object of this class will represent a circle, storing its radius (r) and the a and b coordinates of its center as doubles.
The class must include
a default constructor function whose prototype is
Circle(double radius, double centerX, double centerY);
to set (initialize) radius and center coordinates.
a member function named double area() that returns the area of the circle.
a member function named double circ() that returns circumference.
a member function named bool isInside(double x, double y) that returns true if the given point (x, y) is inside the circle and
returns false otherwise.

[code]
#include<iostream>
using namespace std;
class circle {
private:
double m_r;
double m-cx;
double m_cy;
public:
circle(double,double,double);
double area() {return(3.14*m_r*m_r); }
double circ() {return(3.14*m_r);}
bool isİnside(double x,double y);
}
int main () {
circle guzelcember (10.0,0.0,0.0);
cout<<guzelcember.area()<<endl;
cout<<guzelcember.circ()<<endl;
cout<<guzelcember.isİnside(1.5,2.7)<<endl;
return 0;
}
// Constructor function
circle::(double radius,double centerX,double centerY) {
m_r=radius;
m_cx=centerX;
m_cy=centerY;
}
bool circle::isİnside(double x,double y) {
I couldnt write this function and I cant continue to write code.Can anybody help me please?
Look at sum:
(x - a)2 + (y - b)2

The point (a,b) is the center of a circle.
The point (x,y) is some point.

If the (x,y) is exactly on the circle, then the sum is equal to r2. So says the general equation.

What does happen to the sum, if (x,y) is not on the circle?
What if it is closer to center, i.e. inside?
Topic archived. No new replies allowed.