On Fri, 14 Dec 2001 07:06, Berin Loritsch wrote: > So if the "Profilable" interface was changed to add the setName(), we could > implement something like this: > > interface Profilable { > void setName( String name ); > // ..... skip other already declared methods ..... > } ...snip... > > What are your feelings on the subject?
I really dislike any notion of a public setName() method. Perhaps it would be better to allow points to create their own children. If that is not viable for whatever reason then you could make constructors look like class MyPoint { MyPoint( Point parent, String myName ) { super( parent, myName ); } } and the name would be set via parent.getName() + myName however the method getName() would be protected, package or private access (depending on what we could get away with) and done in the case class. -- Cheers, Pete *------------------------------------------------------* | Hlade's Law: If you have a difficult task, give it | | to a lazy person -- they will find an easier | | way to do it. | *------------------------------------------------------* -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>