Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
