Language is C++ Rare Collection. We can make arrays of custom objects just like we’ve done  with ints and strings. While it’s possible to make both 1D and 2D arrays of objects (and more), for this assignment we’ll start you out with just one dimensional arrays:  directions as follows in the pictures

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Language is C++

Rare Collection. We can make arrays of custom objects just like we’ve done 
with ints and strings. While it’s possible to make both 1D and 2D arrays of objects (and more), for this assignment we’ll start you out with just one dimensional arrays:
 directions as follows in the pictures 

**Assignment8A Class Instructions**

In this task, you will create a separate class named `Assignment8A`. In its main method, perform the following steps:

1. **Initialize Collection**:
   - Prompt the user to input the number of movies in their collection.
   - Create an array of `LaserDisc` objects with the specified size.
   - Use a loop to gather information for each movie:
     - Create a `LaserDisc` object for each movie and store it in the array.

2. **User Interaction Options**:
   - Implement a loop to provide the user with these options:
     - **Print Movie Information**:
       - Request a movie index from the user, then display the corresponding movie details. 
       - Alert the user if an out-of-bounds index is entered.
       
     - **Recommend a Good Movie**:
       - Randomly select a movie, evaluate its quality based on a predetermined function, and display its details if it meets the criteria, or prompt the user again if not.
       - Notify the user if there are no good movies in the collection.
       - **Hint**: Use a counter to track attempts. If the number of guesses exceeds the array's size, terminate the recommendation process. Be aware of potential repeated random selections and consider solving this to enhance the experience.
     
     - **Quit**:
       - Exit the loop and terminate 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
```

This structured process enables users to efficiently manage and explore their movie collections while interacting with a potentially informative program.
Transcribed Image Text:**Assignment8A Class Instructions** In this task, you will create a separate class named `Assignment8A`. In its main method, perform the following steps: 1. **Initialize Collection**: - Prompt the user to input the number of movies in their collection. - Create an array of `LaserDisc` objects with the specified size. - Use a loop to gather information for each movie: - Create a `LaserDisc` object for each movie and store it in the array. 2. **User Interaction Options**: - Implement a loop to provide the user with these options: - **Print Movie Information**: - Request a movie index from the user, then display the corresponding movie details. - Alert the user if an out-of-bounds index is entered. - **Recommend a Good Movie**: - Randomly select a movie, evaluate its quality based on a predetermined function, and display its details if it meets the criteria, or prompt the user again if not. - Notify the user if there are no good movies in the collection. - **Hint**: Use a counter to track attempts. If the number of guesses exceeds the array's size, terminate the recommendation process. Be aware of potential repeated random selections and consider solving this to enhance the experience. - **Quit**: - Exit the loop and terminate 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 ``` This structured process enables users to efficiently manage and explore their movie collections while interacting with a potentially informative program.
### LaserDisc Class Development

#### Overview
You have been tasked with developing a program to digitally record a rare collection of LaserDisc movies. This process starts by creating a `LaserDisc` class with specific attributes and methods.

#### Private Attributes
The `LaserDisc` class contains the following private attributes:

- **String** `movieTitle`
- **int** `releaseYear`
- **String** `genre`
- **float** `rating`

#### Methods
Your class should include these methods:

1. **Default Constructor**
   - Initializes the four attributes with the following default values:
     - `movieTitle = "Star Wars Holiday Special"`
     - `releaseYear = 1978`
     - `genre = "Science Fiction"`
     - `rating = 5.0`

2. **Overloaded Constructor**
   - Initializes the attributes based on values passed into the formal parameters:
     - If `rating` is less than 0.0 or greater than 5.0, set it equal to 0.0.
     - If `releaseYear` is less than 1978, set it equal to 1978.

3. **bool/Boolean isItGood()**
   - Returns “true” if `rating` is 3.0 or greater, and “false” otherwise.

4. **Getter Method**
   - Provides access for all class attributes. 

This structure ensures the class is both robust and flexible, suitable for managing the details of a classic LaserDisc collection effectively.
Transcribed Image Text:### LaserDisc Class Development #### Overview You have been tasked with developing a program to digitally record a rare collection of LaserDisc movies. This process starts by creating a `LaserDisc` class with specific attributes and methods. #### Private Attributes The `LaserDisc` class contains the following private attributes: - **String** `movieTitle` - **int** `releaseYear` - **String** `genre` - **float** `rating` #### Methods Your class should include these methods: 1. **Default Constructor** - Initializes the four attributes with the following default values: - `movieTitle = "Star Wars Holiday Special"` - `releaseYear = 1978` - `genre = "Science Fiction"` - `rating = 5.0` 2. **Overloaded Constructor** - Initializes the attributes based on values passed into the formal parameters: - If `rating` is less than 0.0 or greater than 5.0, set it equal to 0.0. - If `releaseYear` is less than 1978, set it equal to 1978. 3. **bool/Boolean isItGood()** - Returns “true” if `rating` is 3.0 or greater, and “false” otherwise. 4. **Getter Method** - Provides access for all class attributes. This structure ensures the class is both robust and flexible, suitable for managing the details of a classic LaserDisc collection effectively.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education