Your task is to define two classes:
Device
showType()
Generic Device
Actuator
showActuator()
Actuator Device
The program will:
Example
Output:
Generic Device Actuator Device
Why this output?
Because showType() becomes private when inherited, so only the Actuator itself can use it, not even further derived classes.
Question Significance
Demonstrates private inheritance, where base methods become private members in the derived class.
Test Cases
Test Results
Input
Expected Output