#include #include #include using namespace std; class channelGuideType { private: int channelNumber; string chAbbrev; string chFullName; public: void setChannelNumber(int newNumber) { channelNumber = newNumber; } void setChAbbrev(string newAbbrev) { chAbbrev = newAbbrev; } void setChFullName(string newFullName) { chFullName = newFullName; } int getChannelNumber() { return channelNumber; } string getChAbbrev() { return chAbbrev; } string getChFullName() { return chFullName; } }; void setChannelNumber(channelGuideType &chGuide){ int inputNumber; cout << "Enter the new channel number: "; cin >> inputNumber; chGuide.setChannelNumber(inputNumber); } int main() { channelGuideType *chFirstChannel; chFirstChannel = new channelGuideType(); setChannelNumber(*chFirstChannel); chFirstChannel->setChAbbrev("TWC"); chFirstChannel->setChFullName("The Weather Channel"); cout << "The channel number is " << chFirstChannel->getChannelNumber() << endl; cout << "The channel Abbreviation is " << chFirstChannel->getChAbbrev() << endl; cout << "The channel full name is " << chFirstChannel->getChFullName() << endl; channelGuideType *chSecondChannel; chSecondChannel = new channelGuideType(); setChannelNumber(*chSecondChannel); chSecondChannel->setChAbbrev("TSC"); chSecondChannel->setChFullName("The Science Channel"); cout << "The channel number is " << chSecondChannel->getChannelNumber() << endl; cout << "The channel Abbreviation is " << chSecondChannel->getChAbbrev() << endl; cout << "The channel full name is " << chSecondChannel->getChFullName() << endl; return 0; }