Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose that you are required to build a phonebook storing entries using single

ID: 3736394 • Letter: S

Question

Suppose that you are required to build a phonebook storing entries using single linked list. Your program comprises at least 3 classes, namely the Person, Phoneboo!k and Node. Generally, a user will be able to insert, update, delete, and find any person's information from your phonebook program, if exists. Answer the followings regarding the phonebook implementation: 1) A Node class represents the node of the single linked list. Construct the Node class in Java based on the UML class diagram depicted in Figure 1 Node person: Person link: Node Figure 1: Node class diagram [10 marks]

Explanation / Answer

public class Node { private Person person; private Node link; public Person getPerson() { return person; } public void setPerson(Person person) { this.person = person; } public Node getLink() { return link; } public void setLink(Node link) { this.link = link; } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote