Hello all,
     
     thanx for ur tips.
     
     regards,
     vivek


______________________________ Reply Separator _________________________________
Subject: RE: (ROSE) Inclusion of main() in Sequence Diagrams(newbee
Author:  dearborn ([EMAIL PROTECTED]) at internet
Date:    12/6/00 11:35 AM


The UML has a concept of a "class utility".  You can look up the definition 
for yourself, but this is what I use for C++ when I have a collection of 
functions that are dumped into the same source file.
     
1.  Make your main() method the only method on a class utility; use 
stereotypes if you have to.
2.  On the sequence diagram, select this as your "class" , or better, look 
at this as a component.
     
3.  I think that it is funny that many people think that having a "main", is 
not thinking "Object-Oriented"!  It does not violate any object oriented 
principles: it is an abstraction, it can hide its own details, it can have a 
well-defined interface and an instance of it IS created at run-time (as a 
process).  Java applications have a "main" and other functional blocks of 
execution are abstractions (i.e. Thread class).  Smalltalk has processes and 
tasks as "objects", classes and even blocks of code can become parameterized 
and independently run!  Functions can be considered as "objects", look at 
the C++ STL, and even Java (Comparator).  It is all in the DEGREE of amount 
of logic that is within the implementation of your main();  there should be 
many objects instantiated here and they should perform most of the 
responsibilities of main; main() becomes the "great delegator".  I think 
that is this last notion that many people are attempting to assert.
     
     
     
     
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Singh, Shiv 
Sent: Tuesday, December 05, 2000 12:04 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: (ROSE) Inclusion of main() in Sequence Diagrams(newbee)
     
     
     
Hi Vivek,
C++ is NOT PURE oo language and hence you have some thing called "Main" 
function. This function is out side all classes and beyond OO paradigm. 
Comming to your question :
"
i am doing Sequence diagrams for a module to be developed in C++. In
     case of C++, the first function to be called is main(). In my Sequence 
     Diagram, do i show main()?? if yes, then which class does it belong??
"
In sequence diagrams you have to show "objects" (instances of classes) and 
since functionality encapsulated in main does not belong to any class so you 
can not have objects with these functionalities. So the solution I would 
recommend is create a new class with these functionalities and an object of 
this class should be used in the sequence diagram.
Hope this helps.
Shiv
     
     
Rational
the e-development company
     
Shiv Kumar Singh
Software Engineering Specialist
Phone:  212-584-1078
FAX:    212-584-1050
[EMAIL PROTECTED]
     
     
     
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 05, 2000 1:15 AM
To: [EMAIL PROTECTED]
Subject: (ROSE) Inclusion of main() in Sequence Diagrams(newbee)
     
     
     
     Hello all,
     
     i am doing Sequence diagrams for a module to be developed in C++. In 
     case of C++, the first function to be called is main(). In my Sequence 
     Diagram, do i show main()?? if yes, then which class does it belong??
     
     say i have a class InputReader which reads the input from the user.It 
     is an boundry class and the first class to be called.
     
     in this case, where do i include main() in the seq. diagram and how do 
     i call a function in InputReader ??
     
     Hope the problem is clear.
     
     Regards,
     Vivek
     
     
************************************************************************ 
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support 
*
* Admin.Subscription Requests: [EMAIL PROTECTED] 
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl 
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email 
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
************************************************************************* 
************************************************************************ 
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support 
*
* Admin.Subscription Requests: [EMAIL PROTECTED] 
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl 
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email 
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************
     

************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages: 
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************

Reply via email to