Exercise: Remove Mistakes
Find bad movies based on their reviews
Now, it’s your turn to remove some mistakes from our catalog of movies. The code below has a number of mistakes.
For this exercise, the
Movie class contains a genre, a director’s name, and some reviews. The new
Review class has a score and a comment.
This time, we have a list of bad movies. Let’s check their ratings and reviews to see if they’re that bad.
Authors Note: By the way, I grabbed these “bad movies” from the IMDb website. I’m sure some of them are very enjoyable—labeling them “bad” is simply for the purposes of our example below.
Also, before I forget, the code for the exercise throws a
System.NullReferenceException. That’s one of the mistakes to fix.