You will then create a separate class, Assignment8A. In its main method, you should do the following: • Ask the user how many movies are in their collection Create an array (of type LaserDisc) of that size Use a loop to ask the user to enter information for all movie • Create a LaserDisc object for each movie and store it in the next index in the array Then using another loop, you should give the user the following options: Print movie information • This should ask the user for a number, and then print the information from the LaserDisc object at that index. If the index is out of bounds, it should notify the user instead. • Recommend a good movie from the collection • This should choose a random movie, check if it is a good movie based on the relevant function, and either print the information to the user or guess again if it was not a good movies If there are no good movies in the collection, tell the user that no good movies exist in the collection. Hint: You can use a counter variable to keep track of the guesses. When you've guessed more times than numbers of elements in the array, you can stop. However, this means you might miss some movies if the same index is randomly selected multiple times. If you want to challenge yourself further, consider another way you could handle that situation. Quit • Ends the loop and the program Sample Output: [Laser Disc Collection] How many movies do you'have? 10 Movie 1: *Enter Title: Back to the Future *Enter Genre: Science Fiction *Enter Release Year: 1985 *Enter Rating: 5.0 Movie 2: *Enter Title: Twin Peaks Season 1 *Enter Genre: Mystery-Horror Serial Drama *Enter Release Year: 1992 "Enter Rating: 4.5 //Keep going for all 10 movies (THIS IS NOT PART OF THE OUTPUT) [Main Menu] 1) Movie Info 2) Recommend a Good Movie 3) Log off

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Code written in C++ ONLY!!!!

You will then create a separate class, Assignment8A. In its main method, you should do the
following:
Ask the user how many movies are in their collection
• Create an array (of type LaserDisc) of that size
• Use a loop to ask the user to enter information for all movie
• Create a LaserDisc object for each movie and store it in the next index in the array
Then using another loop, you should give the user the following options:
• Print movie information
• This should ask the user for a number, and then print the information from the
LaserDisc object at that index. If the index is out of bounds, it should notify the user
instead.
Recommend a good movie from the collection
• This should choose a random movie, check if it is a good movie based on the relevant
function, and either print the information to the user or guess again if it was not a
good movies If there are no good movies in the collection, tell the user that no good
movies exist in the collection.
Hint: You can use a counter variable to keep track of the guesses. When you've
guessed more times than numbers of elements in the array, you can stop. However,
this means you might miss some movies if the same index is randomly selected
multiple times. If you want to challenge yourself further, consider another way you
could handle that situation.
• Quit
• Ends the loop and the program
Sample Output:
[Laser Disc Collection]
How many movies do you have? 10
Movie 1:
"Enter Title: Back to the Future
*Enter Genre: Science Fiction
"Enter Release Year: 1985
*Enter Rating: 5.0
Movie 2:
"Enter Title: Twin Peaks Season 1
*Enter Genre: Mystery-Horror Serial Drama
*Enter Release Year: 1992
*Enter Rating: 4.5
//Keep going for all 10 movies (THIS IS NOT PART OF THE OUTPUT)
[Main Menu]
1) Movie Info
2) Recommend a Good Movie
3) Log off
Transcribed Image Text:You will then create a separate class, Assignment8A. In its main method, you should do the following: Ask the user how many movies are in their collection • Create an array (of type LaserDisc) of that size • Use a loop to ask the user to enter information for all movie • Create a LaserDisc object for each movie and store it in the next index in the array Then using another loop, you should give the user the following options: • Print movie information • This should ask the user for a number, and then print the information from the LaserDisc object at that index. If the index is out of bounds, it should notify the user instead. Recommend a good movie from the collection • This should choose a random movie, check if it is a good movie based on the relevant function, and either print the information to the user or guess again if it was not a good movies If there are no good movies in the collection, tell the user that no good movies exist in the collection. Hint: You can use a counter variable to keep track of the guesses. When you've guessed more times than numbers of elements in the array, you can stop. However, this means you might miss some movies if the same index is randomly selected multiple times. If you want to challenge yourself further, consider another way you could handle that situation. • Quit • Ends the loop and the program Sample Output: [Laser Disc Collection] How many movies do you have? 10 Movie 1: "Enter Title: Back to the Future *Enter Genre: Science Fiction "Enter Release Year: 1985 *Enter Rating: 5.0 Movie 2: "Enter Title: Twin Peaks Season 1 *Enter Genre: Mystery-Horror Serial Drama *Enter Release Year: 1992 *Enter Rating: 4.5 //Keep going for all 10 movies (THIS IS NOT PART OF THE OUTPUT) [Main Menu] 1) Movie Info 2) Recommend a Good Movie 3) Log off
Choice: 1
Which Movie do you want? 100
Sorry, that's not a valid Movie index
[Main Menu]
1) Movie Info
2) Recommend a Good Movie
3) Log off
Choice: 1
Which movie do you want? 0
0. Back to the Future, 1985
Genre: Science-Fiction
Rating: 5.0
[Main Menu]
1) Movie Info
2) Recommend a Good Movie
3) Log off
Choice: 2
You should try: Dune (1984)!
It has a rating of 4.1
[Main Menu]
1) Movie Info
2) Recommend a Good Movie
3) Log off
Choice: 3
Goodbye!
Transcribed Image Text:Choice: 1 Which Movie do you want? 100 Sorry, that's not a valid Movie index [Main Menu] 1) Movie Info 2) Recommend a Good Movie 3) Log off Choice: 1 Which movie do you want? 0 0. Back to the Future, 1985 Genre: Science-Fiction Rating: 5.0 [Main Menu] 1) Movie Info 2) Recommend a Good Movie 3) Log off Choice: 2 You should try: Dune (1984)! It has a rating of 4.1 [Main Menu] 1) Movie Info 2) Recommend a Good Movie 3) Log off Choice: 3 Goodbye!
Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY