Subject: Re: HW3

From: Chee Yap <[email-masked]>
Date: Fri, 15 Oct 1999 17:28:12 -0400 (EDT)

Rehan:

(1) The answer is "yes" to your question below.
Actually, the interface for hw3 already
require the method

	 setItem(String).

We no longer need setItem(Object) from hw2.

(2) Yes, you need to slightly modify the readFromFile()
method to match our new interface.  In particular,
you need to modify the line 

	last.setNext(curr);

into

	last.setItem(curr.getItem());

I will cc this reply to the class.

--Chee

> From [email-masked] Fri Oct 15 14:49 EDT 1999
> From: [email-masked]
> Date: Fri, 15 Oct 1999 14:49:16 EDT
> Subject: Re: HW3
> To: [email-masked], [email-masked]
> 
> in regards to method:
> 
> public void setItem(nodeInt n);
> 
> in the method:
> 
> public int readFromFile (String fn);
> 
> if i am doing the conversion correctly from the previous hw, we will have to 
> set the following variables:
> 
> myNode curr = new Mynode();
> myNode last = this;
> 
> and then later on , we will have to do the following:
> 
> last.setItem(curr);
> curr=new myNode();
> ...
> last.setNext(curr);
> last = last.getNext();
> curr = new myNode();
> 
> last and curr are both myNodes however the setNext method only accepts a 
> String...therefore is it again necessary to implement a setItem routine which 
> accepts Strings?
> 
> public void setItem (String s) { item = s; }
> 
> Thank you once again,
> 
> Rehan
>