Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

- Do all exercises (full solution). - practice using composition. - write code using basic C++ syntax. Define and implement a class Program as described

- Do all exercises (full solution).
- practice using composition.
- write code using basic C++ syntax. image text in transcribed
image text in transcribed
Define and implement a class Program as described below: Data Members: Each Program object stores the program_name, program_presenter as string, duration as integer, the date on which the program will be shown as an object of type Date and the time on which the program will be shown as an object of type Iime. Date and time classes are already implemented in the aftached files. Member functions: - A default constructor, initialize the data members to whatever default values you like. - A parameterized constructor that receives all data members as required arguments. - You must use the initializer list in cach of the above two constructors. - setters and getters for all data members. - Print 0 , that print all details of the program in the following format: [program_name] presented by Iprogram_presenter] it will be shown on [Date] at [Time] and the duration in minutes: [Duration]. - Functions that do not modify any data member must be declared const. - Returned and passed Date and Time objects fromito functions must be done using references to comstant objects (const Date\&). Ex 2. Channel Class Data members: - Channel_aame as string. - array of Programs of size 100. - Signal strength as integcr. Function member: - A parameterized constractor. - Setters and Getters for all data members, for Signal_strength the value must be greater or equal 0 , and if the value is 0 you have to call no signal0. - Void no signal0, that print the following: P. Finutin - bool Is_available (program ph that checks if the channel is available at the time and date of the reccived object (Taking into account the duration of the program). - bool Is full 0, this funcrion checks if the array is full or not. - Add program (program p), that check if the array is full or not, if yes then print an appropriate sentence indicating that the channel is full, if no then check if the channel is available or not, if no then print an appropriate sentence indicating that the channel is not available, if yes then add the program. - Print 0 , that prints all details of the channel, including the details of programs. Ex 3. Driver - Define one object of type channel with all information of the channel. - Add 5 programs to the channel. - Print the details of the channel. - Set the Signal strength to 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Real Time Database And Information Systems Research Advances

Authors: Azer Bestavros ,Victor Fay-Wolfe

1st Edition

1461377803, 978-1461377801

More Books

Students also viewed these Databases questions

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago

Question

d. What language(s) did they speak?

Answered: 1 week ago

Question

e. What difficulties did they encounter?

Answered: 1 week ago