Question: Create a class called Circle which inherits from Sortable. A Circle object will only have a radius. Circle objects are compared according to radius. Circleobjects
Create a class called Circle which inherits from Sortable. A Circle object will only have a radius. Circle objects are compared according to radius. Circleobjects should be printed one per line as follows, Circle with radius: x, where x is the radius of the circle.
can test your code with the file sortingCircles.cpp as well as the Sortable.h file and the Data.h file

Data.h Sortable.h #ifndef DATAh #define DATA h 1 ifndef LA6_Sortable_h #define LA6Sortableh - - - 4 class Sortable f 4 #includeiostream 5 #includevector 6 #include "Sortable"h" 7 using namespace std; 6 public: virtual bool compare (const Sortable * s)e; virtual void print)- e 9 class Data 9 1e 11 #endif 10 private: vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
