ART MOMENT:
.
![]() |
"The Worcester Hunt mosaic, the largest floor mosaic brought to America, was excavated in the 1930s from a villa in Daphne, a suburb of the ancient Roman city of Antioch, now a part of Antakya, Turkey. [cite]" |
At the end of today's class you should
HAVE READ:
KNOW:
BE ABLE TO:
DAILY QUESTION:
/** Node
class representing an integer. */ public class NumberNode { int value; /* node value. */ NumberNode next; /* next one. */ public NumberNode (int i) { value = i; next = null; } } |
/** List of
numbers. */ public class NumberList { NumberNode head; /* first one. */ /** prepend a NumberNode with i to the front of the list. */ public void add (int i) { … } } |
Consider that you are shown the following method in the NumberList class:
/** Method in NumberList. */ public void doSomething() { NumberNode node = new NumberNode(3); NumberNode other = new NumberNode(5); head = node; other.next = node; head.next = new NumberNode(7); node.next = other; other.next = null; } |
What is the resulting list? Much of HW4 focused on your ability to perform such low-level manipulation of linked lists. You need to be able to understand the impact of these statements above.
Sample Exam question(s)