Write a program to read data (roll no, name, age and marks) of students. Now aft
ID: 3539397 • Letter: W
Question
Write a program to read data (roll no, name, age and marks) of students. Now after having read the students%u2019 data perform the following operations:
1. Display students%u2019 data for names beginning with a particular letter (this letter should be taken as input)
2. Display students%u2019 data for roll nos within a particular range (this should be taken from the user).
3. Display students%u2019 data in descending order of their ages
For simplicity sake, consider roll nos from 1 to 100 only.
Sample program run (Text in bold is what your program should display)
Reading the students%u2019 data:
Enter roll number: 001
Enter name: Surya
Enter age: 30
Enter marks: 29
Do you want to enter another student%u2019s details (Y/N)? Y
Enter roll number: 045
Enter name: Sundeep
Enter age: 27
Enter marks: 40
Do you want to enter another student%u2019s details (Y/N)? Y
Enter roll number: 089
Enter name: Rakesh
Enter age: 28
Enter marks: 89
Do you want to enter another student%u2019s details (Y/N)? Y
Enter roll number: 034
Enter name: Charan
Enter age: 27
Enter marks: 46
Do you want to enter another student%u2019s details (Y/N)? N
Select an operation you want to perform on the students%u2019 data:
1. Display students%u2019 data for names beginning with a particular letter
2. Display students%u2019 data for roll nos within a particular range
3. Display students%u2019 data in descending order of their ages
4. Exit
What do you want to do (1-4)? 1
What is the beginning letter? S
Please find below the students%u2019 data beginning with letter %u2018S%u2019
001 Surya 30 29
045 Sundeep 27 40
Do you want to perform another operation (Y/N)? Y
Select an operation you want to perform on the students%u2019 data:
1. Display students%u2019 data for names beginning with a particular letter
2. Display students%u2019 data for roll nos within a particular range
3. Display students%u2019 data in descending order of their ages
4. Exit
What do you want to do (1-4)? 2
Enter the starting roll number: 011
Enter the ending roll number: 034
Please find below the students%u2019 data in the range 011 and 034:
034 Charan 27 46
Do you want to perform another operation (Y/N)? Y
Select an operation you want to perform on the students%u2019 data:
1. Display students%u2019 data for names beginning with a particular letter
2. Display students%u2019 data for roll nos within a particular range
3. Display students%u2019 data in descending order of their ages
4. Exit
What do you want to do (1-4)? 3
001 Surya 30 29
089 Rakesh 28 89
045 Sundeep 27 40
034 Charan 27 46
Do you want to perform another operation (Y/N)? N
At this point the program should exit.
Note:
Follow proper naming conventions for your class and method names.
Have two classes, one for the logic and the other for the driver (have main method in this class).
Package your code.