Try not to spend more than 40 minutes on this problem! Creat…
Try not to spend more than 40 minutes on this problem! Create three classes 1)Criminal is an abstract class2)Thief is a class that inherits from Criminal3) Killer is a class that inherits from Criminal You decide which variables and methods should be static or instance unless it is explicitly stated. _____________________________________ Criminal one variable nameOfPrisoner //You decide whether it is instance or static one method displaySentence( ); // method should be abstract_________________________________________Thief one variable numberOfTheives //You decide whether it is instance or static one method displaySentence() { System.out.print (“2 months in jail”); }___________________________________________Killer one instance variable numberOfPeopleKilled one method displaySentence( ) { System.out.println(“two years in jail”); } In the main method you will create an array of type criminal that can hold two objects and populate it according to the following: The first element of the array is an object of type Thief. His name is Jim.Increment numberOfThieves variable The second element of the array is an object of type killer. His name is Jack and he killed 3 people Run the through array using a for loop and display the following for each person where appropriate:1) the the name of each criminal,2) displaySentence method to display each person’s sentence3) number of people that were killed if the person is a killer.4) At the end of program display the numberOfThieves