Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Provide code to define a class Movie to represent individual movie objects. Movie should include title, year and quotes list (initially empty). (1 mark) It
Provide code to define a class Movie to represent individual movie objects. Movie should include title, year and quotes list (initially empty). (1 mark) It should also have methods to: - __str__ - convert the movie to a string (1/2 mark) - addQuote (quote) - to add a movie quote to the extendable list of notable quotes (1/2 mark) - getQuotes () - return the list of quotes from the movie's list (1/2 mark) - getRandomQuote( ) - return a random quote from the movie's list (1/2 mark) e.g. - "Monty Python and the Holy Grail" (1975) - "It's just a flesh wound!" - Black Knight - "Your mother was a hamster and your father smelt of elderberries!" - French Solider - "Well she turned me into a newt...I got better' - Peasant - "Life of Brian" (1979) Provide code to demonstrate the functionality of the class \# code for 5 a here [] Question 5b (4 marks) Now provide code to: It should have methods to: - _str__ - convert the library into a string - name, owner and number of films (1/2 mark) - addMovie(title, year) - to add a movie to the extendable list of movies ( 1/2 mark) - addQuote (movie, quote) - to add a movie quote to the extendable list of notable quotes (1/2 mark) - getQuotes (movie) - return the list of quotes from the movie's list (1/2 mark) - getRandomQuote (movie) - return a random quote from the movie's list (1/2 mark) - displayCatalogue ( ) - to print out all the movies in the library (1/2 mark) Provide code to demonstrate the functionality of the class
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started