Question: Using python 3 to solve this problem. Movie Write a class that satisfies the following UML diagram and has a available: boolear constructor that always

 Using python 3 to solve this problem. Movie Write a class

Using python 3 to solve this problem.

Movie Write a class that satisfies the following UML diagram and has a available: boolear constructor that always assigns available to true and allows setting of the name and year attribute via the parameter, use returnMovie) default values for params (your+ isAvailable() : boolean choice). Renting the media makes it unavailable (if it is currently unavailable, display a message that it cannot be rented) and returning it makes it available again name string - year int rentMovie(0) +str) string str..() method should return a string such as "Movie Title (1900)" Movie Class In-Class Assignment Write a main method in a separate file that Adds in at least 4 movies, examples: ("Lion King", 1994) ("Dumb and Dumber", 1994), "Ghostbusters", 1984) ("Gremlins", 1984). These must be added to some sort of data structure (hard-coded) Displays some kind of menu that displays all available movies Allows the user to rent a movie or return all the movies they have After renting/ redisplay the menu with the now available movies Example Execution on Next Slide Movie Class In-Class Assignment 1) Rent a Movie (4 in stock) 2) Return all movios (0 rented 1) Lion King (1994) Renting: 3) Quit what do you want to do? 2) Dumb and Dumber (1994) 3) Ghostbusters (1984) What do you want to rent? Renting: 1) Lion King (1994) 2) Dumb and Dumber (1994) 3) Gremlins (1984) 4 Ghostbusters (1984) Nhat do you want to rent? 1) Rent a Movie (2 in stock) 2) Return all movies (2 rented 3) Quit What do you want to do? 2 ) Rent a Movie (3 in stock) 2) Return all movies 1 rented 1) Rent a Movie (4 in stock) 2) Return all movies (0 rented 3) Quit What do you want to do? 3) Quit What do you want to do

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!