Question: Based on the given code for the base header class called TVNetworks ( listed below ) , construct a program that creates two derived header
Based on the given code for the base header class called TVNetworks listed below construct a program that creates two derived header classes called SportsNetworks and EntertainmentNetworks and one implementationtest class to develop your object instances. The SportsNetworks header class should contain one unique data attribute called subscribers long int datatype while the EntertainmentNetworks header class should also contain one unique data attribute called networktype string datatype For both classes, a default constructor, and the appropriate setters and getter methods should be created, respectively. The implementationtest class should create six object instances representing the two derived classes see table below You can use initialization to store these values into the respective data attributes.
Official Question: Implementation C Solution: Write the necessary C syntax to solve this problem. If you desire to complete the question using an external document ex Notepad, Microsoft Word, etc. feel free to do so A submission tab via Canvas is provided for you to upload this file as a txt or doc file only
#include
#ifndef TVNETWORKSH
#define TVNETWORKSH
#include
using namespace std;
class TvNetworks
private:
string name;
int yearofestablishment;
public:
TvNetworks
string name ;
yearofestablishment ;
TvNetworksstring n int yoe
name n;
yearofestablishment yoe;
void setNamestring n
name n;
void setYearofEstablishmentint yoe
yearofestablishment yoe;
string getName const
return name;
int getYearofEstablishment const
return yearofestablishment;
;
#endif
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
