Question: Please implement the following problem in basic C++ code and include detailed comments so that I am able to understand the processes for the solution.
Please implement the following problem in basic C++ code and include detailed comments so that I am able to understand the processes for the solution. Thanks in advance.

// Lab12_a.cpp
#include#include #include using namespace std; class Shape { public: virtual string getType() = 0; virtual double getPerimeter() = 0; virtual double getArea() = 0; }; //Implement class Triangle here //Implement class Circle here void describeShape(Shape &s) { double a = s.getArea(); double p = s.getPerimeter(); string t = s.getType(); cout // Lab12_b.cpp
#include#include using namespace std; class Shape { public: virtual string getType() = 0; virtual double getPerimeter() = 0; virtual double getArea() = 0; }; //Implement class Triangle here //Implement class Circle here void describeShape(Shape &s) { double a = s.getArea(); double p = s.getPerimeter(); string t = s.getType(); cout Question 1: View lab12_a.cpp. Triangles, and Circles are Shapes, geometric objects which can have their perimeter and area calculated. Implement a Shape abstract class, which can be used in the following manner void describeShapelShape &s) f double area- sgetArea), string type s.getType0 double perim-sgeterimeter0 cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
