Question: C++ Programming Operator Overloading Problem Implement a Circle class that has the following characteristics A private field radius and a static private field that keeps

C++ Programming

Operator Overloading Problem

Implement a Circle class that has the following characteristics

A private field radius and a static private field that keeps track of the number of Circle objects created.

A 0 arg constructor and a one arg constructor that accepts and sets the radius.

Get and set methods for the radius.

A getArea() method that calculates the area of the circle.

A static method getNumberOfObjects that returns the number of Circle objects created.

(The Circle class) Implement the relational operators (<, <=, ==, !=, >, >=) in the Circle class by overloading the operators. You should use the radii of the circles to do the ordering. Create 3 Circle objects in your main of different sizes.

Use each constructor at least once.

Demonstrate that the getArea() and getNumberOfObjects() methods work.

Demonstrate each of the overloaded operators two times with differing arguments.

Turn in Circle.h, Circle.cpp and circletest.cpp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!