Question: JAVA I. Create classes: Student with fields name and id student's ID number. The id-numbers (consecutive natural numbers) should be assigned automatically by using a
JAVA 
I. Create classes: Student with fields name and id student's ID number. The id-numbers (consecutive natural numbers) should be assigned automatically by using a static field). StudNode with fields student of type Student and next of type StudNode. Objects of this class will allow us to build singly-linked lists of students; StudGroup representing a group of students. Its two fields are group name (groupName of type String) and head of type StudNode (initially null). This field will be the 'head' of the list of students belonging to the group. In your classes create constructors and methods that you will find useful. In particular, in clas: StudGroup write methods allowing the user to: get and set the name of a group String getName() void setName(String name) add a student at the front of the list represented by field head; two overloaded methods one with parameter of type Student and the second with parameter needed to create an object of this type void addFront (Student s) void addFront (String name) add a student at the back end of the list represented by field head; two overloaded methods - one with parameter of type Student and the second with parameter needed to create an object of this type void addBack (Student s) void addBack (String name) get the number of students in the group int count() check, if the group contains a student with a given ID number boolean isWithID(int id) get an array (possibly empty) of all students in the group with a given name Student[] getStudsWithName (String name) get the object-student with a given identifier Student getStudend(int id) get a string describing the group: its name and the list of students belonging to it (reuse toString from class Student!) public String toString In a separate class write main function which tests the functionality of all classes. Do not use any collections except plain arrays
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
