Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 31st International Conference Dexa 2020 Bratislava Slovakia September 14 17 2020 Proceedings Part 1 Lncs 12391

Authors: Sven Hartmann ,Josef Kung ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

303059002X, 978-3030590024

More Books

Students also viewed these Databases questions

Question

=+ Are there closed-shop requirements or practices?

Answered: 1 week ago