Create a class called Film which will have two instance
variables - title of the film and length of the film,
constructor with arguments, accessor methods, toString
method, and equals method.
In the test class, create an arraylist of ten film objects
using user input, display the list of fims, and search for
longest and shortest films.
Please note that the test class must contain a method for
searching longest film and another method for searching
shortest film.
Display all elements of arraylist sorted by name.
Also display all elements of arraylist sorted by length.
2 C:\Windows\system32\cmd.exe
List of Films and Their Length
Film: Ek Main Aur Ekk Tu and Film Length: 183
Film: Road to Perdition and Film Length: 117
Film: The Truth about Cats and Dogs and Film Length: 93
Film: Enigma and Film Length: 114
Film: Valentine's Night and Film Length: 145
Film: Ghost and Film Length: 170
Longest film is Ek Main Aur Ekk Tu at 183 minutes
Shortest film is The Truth about Cats and Dogs at 93 minutes
Press any key to continue
X