Marker (1.4.1)

Interface java.rmi.Remote is a Marker used in programs that execute remote method invocation. Code a simple class that performs arithmetic operations that can be invoked remotely. Where do you use interface java.rmi.Remote? What happens if your code forgets to implement/extend it?

Marker (1.4.2)

The section on "Marker" in chapt. 4, page 73, defines class LinkedList. Objects of this class store sequences of objects, referred to as the elements, that can be compared according two different criteria of equality, == or equals. The selection of one or the other criterion is set using a Marker. This implies that subclasses of an element cannot conceptually override the criterion (why?).

Modify class LinkedList so that subclasses of an element type can override the criterion of equality. Discuss advantages and disadvantages of your implementation with respect to the textbook's implementation. Hint: use dynamic polymorphism to select the equality criterion to apply to the elements.