Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Circle Class A circle is identified by its center coordinates and its radius, as shown in the figure below. In the main file create N

Circle Class A circle is identified by its center coordinates and its radius, as shown in the figure below. In the main file create N circles and implement a circle class whose specification is given below. You will need to write three files (Circle.h, Circle.cpp and Q2.cpp)

Your implemented class must fully provide the definitions of following class (interface) functions. Please also write down the test code to drive your class implementation.

class Circle{ private: // think about the private data members... public: // provide definitions of following functions... Circle();// default constructor Circle(int x, int y); Circle(int x, int y, int radius);

//you have to implement the following functions // think about the parameters required and return type of the following functions setCenter();//set center of a circle setRadius();//set radius of a circle getArea();//prints area of a circle returnLargestCircle();//return the largest circle from the array of circles overlapping();//determines of two circles are overlapping or not overlappingCircles();//returns an array of circles overlapping the largest circle ~Circle(); }; int main(){ /you to create N circle objects and give user options to initialize them }

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

Database Design And Implementation

Authors: Shouhong Wang, Hai Wang

1st Edition

1612330150, 978-1612330150

More Books

Students also viewed these Databases questions