// radio.h - header file for class Radio (Nagler, pp. 326-7 // - derived from class Appliance) // cmc, 8/13/03 #ifndef RADIO_H #define RADIO_H #include "appliance.h" class Radio : virtual public Appliance { enum band { AM, FM }; public: // implicit inline functions Radio(band amFm = AM, double station = 810) : Appliance(cost), amFm(amFm), station(station) { } Radio(double cost, band amFm = AM, double station = 810) : Appliance(cost), amFm(amFm), station(station) { } void setStation(double s) { station = s; } double getStation() const { return station; } void setBand(band b) { amFm = b; } protected: band amFm; double station; }; #endif