Answered step by step
Verified Expert Solution
Question
1 Approved Answer
- Create a class called Student with three fields name, id, and age. Create a test class called TestStudent with a main method. In
- Create a class called Student with three fields name, id, and age. Create a test class called TestStudent with a main method. In main method, instantiate Student class several times using hard coded inputs (use input from the output displayed below) and store them into an Arraylist. Do the sorting of arraylist by name first, age and ID using Comparator. Please note that if student names are identical, sort by student age and if student ages are identical then sort by student id. After sorting the arraylist, display the content of arraylist as shown below: CAWindows\system32\cmd.exe studentName StudentAge StudentID 0111 34 8111 34 9 0111 34 10 Clerk 16 Frank Jorge 19 Lee NO Michel 10 Simpson Press any key to continue XX
Step by Step Solution
★★★★★
3.49 Rating (146 Votes )
There are 3 Steps involved in it
Step: 1
Here is the implementation of the Student class and the TestStudent test class in Java java import j...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started