All submissions
#include<iostream>
using namespace std;

class Device
{
public:
    void showType()
    {
        cout<<"Generic Device"<<endl;
    }

};

class Actuator: private Device
{
    public:
        void showActuator()
        {
            showType();
            cout<<"Actuator Device"<<endl;
        }
};

int main()
{
    Actuator a;
    a.showActuator();
}
Loading...

Input

Expected Output

Generic Device Actuator Device