Group
Group
1.Irshad’s contribution
First of all I have created a student class it has for instance variable id ,age ,course.
It has a constructor student (id ,name ,age ,course) to initialize a new student object
It has a display _info method to print a students information to console
It has custom exception class to handle the case where a student with a the same id is
attempted to be added twice. It provides a more specific error message then a generic
exception.
“studentRecordManagement” this is main class. It has Arraylist name ,student to store
all student object.
“Scanner” a scanner object to read user input from console.
It uses a while( true ) loop to continuously display the menu until the user choses to
exit.
It has a switch statement handle the users choice.
2.Shahab’s contribution
_________________________________________________________________________
If a student with same id already exists. If it finds a match, it prevents adding a duplicate by showing a
exception message.
Student details
If the id has unique you will be asked to enter the students name, age and the course they are enrolled
in.
Once you provide all the details, a new student record is made with that information.
This record is then stored in a list ,similar to a collection of folders where all student in formation is kept.
Confirmation Message:
If everything goes smoothly, you will see a message saying “Student record add successful”.
3.Ahmed’s contribution
___________________________________________________________________________
Findstudentbyid Method:
1.Iterate: Loops through the students list.
2.Compare: checks if a student’s id matches the input id.
Return: If a match is found, returns the student object. If no match, return null.