Question: This C++ program will help the user select a movie to watch. It presents the user with menu to choose which method they want to
This C++ program will help the user select a movie to watch. It presents the user with menu to choose which method they want to use, either based on the age of the youngest viewer or by preferred category. After choosing a method, they will be asked to enter the required information and the movie options will be displayed to the screen. The user can try as many times as they like.
For this program, write your name, the program title, and brief instructions to the screen. You will need four string vectors for this program. One for the movies name, one for the movies rating, one for the category list of choices and the last for the movies category. For the categoryChoices, fill the vector with the list of ten choices which are: action, adventure, documentary, drama, fantasy, family, horror, musical, romance, and sci-fi. For the ratings, use the ratings G, PG, PG-13, and R. Find movies that fit into these ratings and categories and choose a couple of movies for each. Do not have more than 3 in the same category. Fill the vectors for name, rating and category with the information that you found using push_back(). Make sure the information is entered in the same order for each vector to keep them parallel.
Open a do-while or while loop that allows the user to pick multiple times. Present a menu asking the user to enter the corresponding number for the method of picking they want to use, age or category. Check which option the user wants with either a switch or an if - else if - else statement and ask the required information. With that you will determine and list the appropriate movie(s).
For the age entered, you will determine which rating applies for that age (assume G is for under 7 and PG is for under 13) and use the rating to search the ratings vector to find at least one movie. If there are more than one, display all that apply.
For the category entered, search the categories vector for movies in that category. You will show a menu with a number for the user to enter, so they do not have to write out the category name. The menu numbers will run from 1 10. After the selected number is read, adjust it for zero-indexing. Then search the movie categories for all that match the selected category and display all that match.
Ask the user if they want to pick another movie, if so, loop back up to the top to start again. When the user has finished picking movies, display a good-bye message.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
