please can u please write a java code for me Create a class called Citizen with the following attributes/variables: a. String citizenID b. String citizenName c. String citizenSurname d. String citizenCellNumber e. int registrationDay f. int registrationMonth g. int registrationYear 2. Create a class called Node with the following attributes/variables: a. Citizen citizen b. Node nextNode 3. Create a class called CitizenRegister with the following attributes/variables: a. Node headNode b. int totalRegisteredCitizens 4. Add and complete the following methods in CitizenRegister: a. head() i. Returns the first citizen object in the linked list b. tail() i. Returns the last citizen object in the linked list c. size() i. Returns the totalRegisteredCitizen d. isEmpty() i. Returns the boolean of whether the linked list is empty or not e. addCitizenAtHead(Node newNode) i. Adds a new node object containing the citizen object information before the headNode f. addCitizenAtTail(Node newNode) i. Adds a new node object containing the citizen object information at the end of the linked list g. addCitizenBefore(String citizenID, Node newNode) i. Adds a new node object containing the citizen object information before the node with the matching citizenID ii. If such citizen object isn’t found display “Citizen has not registered for vaccine” and add the new node at the end of the linked list h. addCitizenAfter(String citizenID, Node newNode) i. Adds a new node object containing the citizen object information after the node with the matching citizenID ii. If such citizen object isn’t found display “Citizen has not registered for vaccine” and add the new node at the end of the linked list i. removeCitizen(String citizenID) i. Deletes the node object containing the citizen object with the matching citizenID ii. If such citizen object isn’t found display “Citizen has not registered for vaccine” j. removeLastCitizen() i. Deletes the last node object containing the citizen object at the end of the linked list k. removeFirstCitizen() i. Deletes the first node object containing the citizen object in the linked list l. displayAllCitizens() Print the name and surname of all the citizens in the linked list in neatly formatted output: citizenNumber 007 citizenName citizenSurname James Bond

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

please can u please write a java code for me

Create a class called Citizen with the following attributes/variables:
a. String citizenID
b. String citizenName
c. String citizenSurname
d. String citizenCellNumber
e. int registrationDay
f. int registrationMonth
g. int registrationYear
2. Create a class called Node with the following attributes/variables:
a. Citizen citizen 
b. Node nextNode 
3. Create a class called CitizenRegister with the following attributes/variables:
a. Node headNode
b. int totalRegisteredCitizens
4. Add and complete the following methods in CitizenRegister:
a. head()
i. Returns the first citizen object in the linked list
b. tail()
i. Returns the last citizen object in the linked list
c. size()
i. Returns the totalRegisteredCitizen
d. isEmpty()
i. Returns the boolean of whether the linked list is empty or not
e. addCitizenAtHead(Node newNode)
i. Adds a new node object containing the citizen object information 
before the headNode
f. addCitizenAtTail(Node newNode)
i. Adds a new node object containing the citizen object information at 
the end of the linked list
g. addCitizenBefore(String citizenID, Node newNode)
i. Adds a new node object containing the citizen object information 
before the node with the matching citizenID
ii. If such citizen object isn’t found display “Citizen has not registered for 
vaccine” and add the new node at the end of the linked list
h. addCitizenAfter(String citizenID, Node newNode)
i. Adds a new node object containing the citizen object information 
after the node with the matching citizenID
ii. If such citizen object isn’t found display “Citizen has not registered for 
vaccine” and add the new node at the end of the linked list
i. removeCitizen(String citizenID)
i. Deletes the node object containing the citizen object with the 
matching citizenID
ii. If such citizen object isn’t found display “Citizen has not registered for 
vaccine” 
j. removeLastCitizen() 
i. Deletes the last node object containing the citizen object at the end 
of the linked list
k. removeFirstCitizen()
i. Deletes the first node object containing the citizen object in the linked 
list
l. displayAllCitizens()
Print the name and surname of all the citizens in the linked list in 
neatly formatted output:
citizenNumber 007
citizenName citizenSurname James Bond

Expert Solution
steps

Step by step

Solved in 5 steps with 11 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY