Your task is to define three classes:
Sensor
void readValue()
Reading sensor value
Logger
void logData()
Logging data
SmartSensor
void process()
readValue()
logData()
The program will:
Example
Output:
Reading sensor value Logging data
Why this output?
Because process() calls both base class methods — one from Sensor and one from Logger.
Question Significance
This shows how a single class can combine functionality from multiple base classes.
Test Cases
Test Results
Input
Expected Output