Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

NAME :- AMANDEEP KAUR

STUDENT ID :- C0910583

1.Here is the constructor for class Movie, which takes a string representing the title of the
movie, a string representing the studio, and a string representing the rating as its arguments
and set the class variables to these values. After that, second constructor for class Movie,
which takes title and studio as its arguments. Next, a method is created getRating which will
return the list of movies with required rating that is PG :
Next is the main method were we will print only movies details for those who have review as
PG.

You might also like