Path: utzoo!attcan!uunet!timbuk!cs.umn.edu!uc!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!rex!rouge!cacs.usl.edu From: pcb@cacs.usl.edu (Peter C. Bahrs) Newsgroups: comp.object Subject: Re: Re: How would yo model this situation? Message-ID: <17486@rouge.usl.edu> Date: 28 Oct 90 18:29:27 GMT Sender: anon@rouge.usl.edu Organization: The Center for Advanced Computer Studies, USL Lines: 38 > I wrote... Responses... Well I have seen a lot of interesting responses on the net and through email. I wish news allowed graphical postings so I could send a picture of the solutions. But, what happens to the rope object? It breaks in two, but each piece has most of the characteristics of the original piece (except things like someone on the other end, length, ...). The two people can still access their respective rope objects. Is this still one rope object that now mangages 2 pieces instead of one? (this is simple to do) Or should the rope object mutate? i.e. break into two distinct objects, each with a unique identity and local state. (Is there an OO term for this?) If this is the case, the old rope object must tell each person... "...here, this is the new name of your rope object..." and then the rope object must destroy itself. Then the person object cannot hard code a declartion to a rope object but keep an association or delegation list somewhere. So, | rope | mutates, then disappears / \ rope2a rope2b Any comments? I suspect that all of this can be modeled in the behaviors of the objects in languages like C++ and Smalltalk. But are there systems that provide mutation? /*----------- Thanks in advance... --------------------------------------+ | Peter C. Bahrs | | The USL-NASA Project | | Center For Advanced Computer Studies INET: pcb@swamp.cacs.usl.edu | | 2 Rex Street | | University of Southwestern Louisiana ...!uunet!dalsqnt!gator!pcb | | Lafayette, LA 70504 | +-----------------------------------------------------------------------*/