// light.cpp // Member function definitions for class Light. #include using std::cout; using std::endl; #include "light.h" Light::Light( const char *string ) // constructor : on( false ), name( string ) { cout << name << " light created" << endl; } Light::~Light() // destuctor { cout << name << " light destroyed" << endl; } void Light::turnOn() // turn light on { on = true; cout << name << " turns on its light" << endl; } void Light::turnOff() // turn light off { on = false; cout << name << " turns off its light" << endl; }