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

Implement the following method as a new static method for the IntNode class. (Us

ID: 3644992 • Letter: I

Question

Implement the following method as a new static method for the IntNode class. (Use the usual Node definition with instance variables called data and link.)

public static boolean dataIsOn(IntNode head, IntNode p)
// Precondition: head is the head reference of a linked list
// (which might be empty, or might be non-empty). The parameter p
// is a non-null reference to some IntNode on some linked list.
// Postcondition: The return value is true if the data in p
// appears somewhere in a data field of a node in head's
// linked list. Otherwise the return value is false.
// None of the nodes on any lists are changed.

Explanation / Answer

QUESTIO?