Question: I need help creating a function, in C++, for a TV object class to delete a pre-existing channel. These channels are basically an array of

I need help creating a function, in C++, for a TV object class to delete a pre-existing channel. These channels are basically an array of strings. How to implement the removeChannel function?

#include #include #include

using namespace std; class TV //TV class { private: bool switchedOn; int currentChannel; string channelTitle[10]; int volume; public: TV() { switchedOn = false; currentChannel = -1; channelTitle[0] = "ESPN"; channelTitle[1] = "World Travel"; channelTitle[2] = "Oscar Awards"; channelTitle[3] = "Business"; channelTitle[4] = "World News"; channelTitle[5] = "Local Weather"; channelTitle[6] = "Disney Channel"; channelTitle[7] = "Game Show"; channelTitle[8] = "CNN"; channelTitle[9] = "Movie - Push"; volume = 0; }

};

void removeChannel(int number) { //Not sure how to go about implementing this }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!