Certainly! Below is an example of a C++ program that demonstrates the concept of inheritance to calculate the area and perimeter of a rectangle. In this program, we will create a base class `Shape` that handles basic shape-related functionalities, and a derived class `Rectangle` that implements specific functionalities for a rectangle.
```cpp
#include <iostream>
using namespace std;
// Base class
class Shape {
public:
// Function to