Build a digital representation of a movie, where a movie has a title and an optional rating between 1 and 5. Also add a way to rate a movie after creation. The rating is specific to a user, but the title is specific to the movie.
Build a watch list of movies.
Functionality:
- Add movies
- Get the next unwatched movie in the list and set that movie as watched
- Display a list of all movies in the list and their watched statuses and ratings
Note: Do not place a package name.
This problem asks you to design a small movie and watch-list model. First, implement a movie object with a title and an optional rating from 1 to 5, where the rating can be assigned after creation and is user-specific. Then build a watch list that supports adding movies, retrieving the next unwatched movie in order while marking it as watched, and displaying every movie with its watched status and rating. The key is to manage order and state cleanly, typically with a list or queue for the movies plus per-movie fields for watched and rating data.