#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 chArray[10]; setChannelNumber(chArray[0]); chArray[0].setChAbbrev("TWC"); chArray[0].setChFullName("The Weather Channel"); cout << "The channel number is " << chArray[0].getChannelNumber() << endl; cout << "The channel Abbreviation is " << chArray[0].getChAbbrev() << endl; cout << "The channel full name is " << chArray[0].getChFullName() << endl; setChannelNumber(chArray[1]); chArray[1].setChAbbrev("TSC"); chArray[1].setChFullName("The Science Channel"); cout << "The channel number is " << chArray[1].getChannelNumber() << endl; cout << "The channel Abbreviation is " << chArray[1].getChAbbrev() << endl; cout << "The channel full name is " << chArray[1].getChFullName() << endl; return 0; }