#include <iostream>
using namespace std;
class Device {
public:
void show(){
cout << "Generic Device\n";
}
};
class Sensor : virtual public Device {
// no extra code needed
};
class Actuator : virtual public Device {
// no extra code needed
};
class SmartDevice : public Sensor,Actuator{
public:
void identify(){
cout << "Smart Device\n";
}
};
// your code here: define class SmartDevice inheriting publicly from Sensor and Actuator
// implement void identify() to print "Smart Device"
int main() {
SmartDevice sd;
sd.show(); // from Device
sd.identify(); // from SmartDevice
return 0;
}