RE: Polymorphic UML sequence diagrams



RE: Polymorphic UML sequence diagrams

From: Zouhaib Zafar <zouhaib_at_hotmail.com>
Date: Mon, 20 Nov 2006 16:21:56 +0000
Message-ID: <BAY124-W53EB62BF7716A573D5B8EADED0@phx.gbl>
Hello all,I have a similar issue regarding Polymorphic UML Sequence Diagrams. I want to model the following scenario using a sequence diagram:There is a base class Shape which is derived by a class Rectangle and a class Circle. draw() is a (pure) virtual method in class Shape and is overridden in the derived classes. How would I show the method "foo(Rectangle r)" of class "Test" by using a sequence diagram, considering foo() as the initiating event of the sequence. class Test{void foo(Rectangle r){    Shape *p;    Circle c1;    p = &c1;    p->draw();    p = &r;    p->draw();    }}Further, are all the functions considered as virtual by UML? Do the UML specifications discuss this issue?Kind Regards,Zohaib 
_________________________________________________________________
Express yourself with gadgets on Windows Live Spaces
http://discoverspaces.live.com?source=hmtag1&loc=us
Received on Mon 20 Nov 2006 - 16:22:30 GMT