java programming
Create a class called Citizen with the following attributes/variables:a. String citizenIDb. String citizenNamec. String citizenSurnamed. String citizenCellNumbere. int registrationDayf. int registrationMonthg. int registrationYear2. Create a class called Node with the following attributes/variables:a. Citizen citizenb. Node nextNode3. Create a class called CitizenRegister with the following attributes/variables:a. Node headNodeb. int totalRegisteredCitizens4. Add and complete the following methods in CitizenRegister:a. head()i. Returns the first citizen object in the linked listb. tail()i. Returns the last citizen object in the linked listc. size()i. Returns the totalRegisteredCitizend. isEmpty()i. Returns the boolean of whether the linked list is empty or note. addCitizenAtHead(Node newNode)i. Adds a new node object containing the citizen object informationbefore the headNodef. addCitizenAtTail(Node newNode)i. Adds a new node object containing the citizen object information atthe end of the linked listg. addCitizenBefore(String citizenID, Node newNode)i. Adds a new node object containing the citizen object informationbefore the node with the matching citizenIDii. If such citizen object isn’t found display “Citizen has not registered forvaccine” and add the new node at the end of the linked listh. addCitizenAfter(String citizenID, Node newNode)i. Adds a new node object containing the citizen object informationafter the node with the matching citizenIDii. If such citizen object isn’t found display “Citizen has not registered forvaccine” and add the new node at the end of the linked listi. removeCitizen(String citizenID)i. Deletes the node object containing the citizen object with thematching citizenIDii. If such citizen object isn’t found display “Citizen has not registered forvaccine”j. removeLastCitizen()i. Deletes the last node object containing the citizen object at the endof the linked listk. removeFirstCitizen()i. Deletes the first node object containing the citizen object in the linkedlistl. displayAllCitizens()Print the name and surname of all the citizens in the linked list inneatly formatted output:citizenNumber 007citizenName citizenSurname James Bond
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here