Question: its all in one question 3. In this problem we have given you three classes in the editor: c. Student class d. Rockstar class e.
3. In this problem we have given you three classes in the editor: c. Student class d. Rockstar class e. Hacker class In the main method, we populated an ArrayList with several instances of these classes. count method calculates how many instances of each type is present in the ArrayList. The code prints three integers, the number of instances of Student class, the number of instances of Rockstar class, the number of instances of Hacker class. Note that the built-in operator used in Java for this purpose should be used. Sample Input 5 Student Student Rockstar Student Hacker Sample Output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
