Question: Implement the following program: 1) Define a class Director with two attributes name and numFilms. 2) Define an init function for Director which sets

Implement the following program: 1) Define a class Director with two attributes name and numFilms. 2) Define an init function for Director which sets the attribute value via input parameters. 3) Define a class Film with three attributes title, rating and director. 4) The Film attribute director is an object of type Director. 5) Define an init function for Film which sets the attribute values via input parameters. 6) Define a print function for Film which prints all attribute values. 7) Create an instance of Film with the values "Star Wars", "PG" and "George Lucas" and 20. 8) Call the Film print function. Example Output Movie Title : Star Wars Director George Lucas Rating: PG Num Films: 20
Step by Step Solution
There are 3 Steps involved in it
Heres the implementation of the program described python class Director def initself name numFilms s... View full answer
Get step-by-step solutions from verified subject matter experts
