Subject: Re: nodeInterface

From: Chee Yap <[email-masked]>
Date: Tue, 5 Oct 1999 10:15:25 -0400 (EDT)

Tony,

You pointed our correctly some flaws in
my design of the interface: I should not have
put methods in there which refers to "node"!
As it turns out, Java was not unhappy to accept
the design.

On the other hand, I **do** want these two
methods (setItem, setNext) to be in your implementation class.
[If I did not have these 2 methods in the interface,
I would have to tell you explicitly to put them
in your implementation class.]  In this sense, my
bad design has the intended effect on your "node" class.

A slight correction to your description of the
3 methods: the first 2 methods do not create any nodes.
It is passed a node "n" as an argument.

Hope this clears up some questions.

See you today in class.

Chee

> From [email-masked] Mon Oct  4 19:26 EDT 1999
> Date: Mon, 4 Oct 1999 19:26:25 -0400 (EDT)
> From: Tony Kusactay <[email-masked]>
> To: Chee Yap <[email-masked]>
> cc: [email-masked]
> Subject: nodeInterface
> 
> Hi all,
> 
> Looking at interface nodeInterface, I noticed something that seems strange
> to me:
> 
>   public void setItem(node n);    // use only n.item
>   public void setNext(node n);
> 
>   public node getNext();
> 
> The first two methods creates a node and calls it n. The third method
> returns a node.
> Now in nodeInterface itself, where is node defined?
> 
> I hope I am not asking a silly question. Any feedback will help me
> greatly.
> 
> Thanks,
> Tony
> 
> p.s. Also one more thing. The comment above "use only n.item", what is
> item? Is that pseudo-talk?
> 
>