Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is the most complex application that you have seen so far. It comprises of six user 0 types: three classes, a struct and two

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
This is the most complex application that you have seen so far. It comprises of six user 0 types: three classes, a struct and two enums. This assignment attempts to simulate a sin version of a Theater application. In this application the user can search for a movie base genre, name of actor, the time of the day and the day of the week. You should define your types in the following order: the two enums, Time, Movie, Show Theater. In the test harness, you will create a theater, some movies and some shows. You movies to the show and then add the shows to the theater. Then, you will perform some queries on this collection. The DayEnum enum This type represents the days of the week and is comprised of seven constants. The constants are the first three letters of the day of the week. It is not necessary to assign values to the members. The GenreEnum Enum This type represents the various categories of movie and is comprised of about 10 constants. It is not necessary to assign values to the members. Time Cass Fields - hours - inutes_ Methods Fields: All the fields are private ints, 1. hours _ - this int represents the tield hours. Maik 2. winutes_ - this int represents the field minutes. manis Gonstructor: 1. Time(int hours, int minutes) - This public constructor takes one mandatory an optional parameters and assigns thern to the appropriate fields. The second paramet optional Methods: 1. std::ostream\& operator } & : \\ \text { - genre_enum_ } & \text { : GenreEnum }\end{array} \) Methods + riend class show ds: he fields are private and are self-explanatory. 1. name - this property is a string representing the title of the movie. 2. year _ - this property is an int representing the year that this movie was released. 3. Length_ - this property is an int representing the length of the movie in minutes. 4. gen re_enum_-this property is an enum representing the genre of this movie. This property is also modified by the SetGenre(Genre genre) method 5. cast_ - this propely is a list of string representing the names of the actors in this movie. onstructor: 1. public llovie(string name, int year, int length) - Thispublic constructor takes one string and two int parameters. it does the following: a. Assigns the ar guments to the appropriate fields. b. Initialize the cast_fied to an cmpty collection of string. c. Initialise the genre_enum_field to Unrated. Methods: 1. void AddActor(const string actor) - This public method takes a single a string argument and addsit to the collection of actors (cast_). 2. void SetGenre(GenreEnum movie_enum) - This public method takes a single enum argumen: and assigns it to the field of the same name. 3. bool HasActor(const string actor) - This public method takes a single a string ar gument and returns if it is present in the collection of actors (cast_.). 4. std:iostream\& operator & os, const GenreEnum \& genre enum) - This mehod overloads the insarion operator so that it can output thea value of the GenreEn um. Examine the output for dues on how to implement the bagic. Show class Fields 1. price_ - this field is a double representing the price of admission to this show. 2. dayEnum _ - this field is an enum representing the day of the week of this show. 3. movie_ - this field is an object reference of the movie class. 4. time_ - this field is an object of the Time dass representing the time of this show. 1ethods: 1. ostream \& operator & show) - This method overloads the insertion operator so that it can cutput the fields of the Show class. Examine the output for clues on how to implement the logic. 2. ostream \& operator

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_2

Step: 3

blur-text-image_3

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

Database Systems For Advanced Applications Dasfaa 2023 International Workshops Bdms 2023 Bdqm 2023 Gdma 2023 Bundlers 2023 Tianjin China April 17 20 2023 Proceedings Lncs 13922

Authors: Amr El Abbadi ,Gillian Dobbie ,Zhiyong Feng ,Lu Chen ,Xiaohui Tao ,Yingxia Shao ,Hongzhi Yin

1st Edition

3031354141, 978-3031354144

More Books

Students also viewed these Databases questions