MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / Shape

Class Shape

Lab_18/main.cpp:16–29  ·  view source on GitHub ↗

Base Class

Source from the content-addressed store, hash-verified

14
15// Base Class
16class Shape
17{ // Abstract class
18protected:
19 double base;
20 double height;
21
22public:
23 void get_data(double base, double height)
24 {
25 this->base = base;
26 this->height = height;
27 }
28 void virtual display_area() = 0; // pure virtual function
29};
30
31// Triangle class to calculate the area of triangle
32class Triangle : public Shape

Callers 1

Shape.hppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected