IPA17
IPA17
rollNo - int
name - String
subject - String
grade - char
date - String [DD/MM/YYYY]
The above attributes should be private.Write Getter and Setter and parametrized
constructor as required.
findStudentByGradeAndMonth Method:
This method will take an array of Student objects, char value as grade and int
value as month
for input parameters.The method will find out all Students from the given grade and
month.
This method will return array of Student object assending based on their rollNo if
found.
If there is no Student that matches then the method should return null.
for this method- main method should print Student name, subject and total student
found [The
length of the list], if the returned value is not null. If the returned value is
null then
main method should print "No student found".
NOTE:
1. For Taking char as input use sc.nextLine().charAt(0)
2. To match/check the month You havee to convert int month in the parameter
to String.
3. No need to count the Student array if return not null just print the array
length.
****************************************************************************
input1:
111
Arijit
Math
B
22/09/2023
101
Priyanka
English
A
30/03/2022
107
Shreosi
History
C
13/05/2022
105
Tatan
Physics
A
27/03/2022
A
3
output1:
Priyanka
English
Tatan
Physics
2
input2:
111
Sohel
Math
B
22/09/2022
101
Priyanka
English
A
30/03/2022
107
Gopa
History
C
12/05/2022
105
Kamal
Physics
A
27/03/2022
A
7
output 2:
No student found