Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Remember the difference between a class and an object. The class is just a blueprint for making objects. For example, don't try to ask the
Remember the difference between a class and an object. The class is just a blueprint for making objects. For example, don't try to ask the Movie class for its title. It doesn't have a title of its own and it doesn't know anything about any Movie objects you may have created.
First, write a class named Movie that has four data members: title, genre, director, and year. It should have:
an init method that takes as arguments the title, genre, director, and year in that order and assigns them to the data members. The year is an integer and the others are strings.
get methods for each of the data members gettitle, getgenre, getdirector, and getyear
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