Question: I need help creating a C++ class that would model a TV set. It should hold a maximum of 10 channels. I want to be

 I need help creating a C++ class that would model a

I need help creating a C++ class that would model a TV set. It should hold a maximum of 10 channels. I want to be able to add and remove channels, I'm not sure if that's necessary in the actual class or could just be done in the main program. Here's what I have so far:

#ifndef TV_H #define TV_H #include

using namespace std;

class TV { public: TV(int a){ switch(a){ case 1: cout

};

#endif /* TV_H */

Trying to call this using the line

cout

In my main program of course fails. I'm sure it has something to do with how I defined this class... could someone help me to simplify this?

Could I just include this in my main program code and just initialize it with the class TV(){} without having to "#include "

Project description Write a C++ program to represent a TV set You must implement the functionality below using classes. No credits will be given if you do not use appropriate classes, Objects and Methods. Your program must contain the following at the minimum TV is on or off TV's current channel if it is on Current channel programming title or name TV's sound volume if it is on Your TV can hold 10 channels maximum

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!