Your task is to define two classes:
Device
void printType()
Generic Device
Sensor
void printSensor()
Sensor Device
The program will:
Example
Output:
Generic Device Sensor Device
Why this output?
Question Significance
This problem demonstrates how a derived class can reuse base class functionality while adding its own behavior.
Test Cases
Test Results
Input
Expected Output