Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a new C++ header file called Circle.h. Enter the following description of

ID: 3687847 • Letter: C

Question

Create a new C++ header file called Circle.h. Enter the following description of a circle class:

#ifndef CIRCLE_H

#define CIRCLE_H

#incliude

using namespace std;

class Circle {

friend bool operator == (Circle C1, Circle C2);

//return true if area of C1 equals area of C2, otherwise it returns false

friend bool inside(Circle C1, Circle C2);

// return true if C1 is inside C2 or C2 is inside C1, otherwise it returns false

public:

Circle ();

Circle (float R, int X, int Y);

void SetRadius (float R);

float GetRadius () const;

Circle& operator = (Circle C); // assign C members to the object members

void WriteArea (ostream & outs) const;

private:

float radius;

int x,y;

};

#endif

Create a new C++ implementation file called Circle.cpp. This file should contain the implementations of the functions in the Circle class. Also, create an application program to test your Circle class.

Explanation / Answer

Hi below i have written a sample code for your reference,

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote