What is the Difference between a Activity Diagram and Sequence Diagram?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   RajaReddy_Gedela
Posted On:   Wednesday, November 6, 2002 03:20 AM

I am giving an example here, please tell me whether we need use Activity diagram or Sequence diagram to represent the below one.

For ex: A shopping cart, where a user needs to add to his cart, he needs to continuously interact and select the items and may delete some items from his cart and finally saves his cart.

Re: What is the Difference between a Activity Diagram and Sequence Diagram?

Posted By:   sid_baker  
Posted On:   Saturday, December 14, 2002 08:34 AM

Lets's relate this question to the origninal Uses Cases that our analysis and user requirements will have thron up...
An Activity diagram shows the process flows in a system. Depending on the outcomes of a particular process different paths can be chosen. In terms of the Use Case this will show its "happy path" (most used) and the alternative paths.
A Sequence diagram will only show one path. It is a diagram showing the timely interaction of objects via messaging to achieve a goal (end result of a single use case path) in the system.

Re: What is the Difference between a Activity Diagram and Sequence Diagram?

Posted By:   RajaReddy_Gedela  
Posted On:   Wednesday, November 6, 2002 03:28 AM

I guess an answer and I am giving here now. Please correct me if I am wrong.

In this case, I will go for the activity diagram, since the User has to enter some items initially to his Cart by using some catalog(may be external), he may remove some of the items from his Cart and finally he may save the cart.
As he is continuously interacting(adding items, removing items and saving), thus this use case "CreateShoppingCart" (for ex:) can be better represented as a Activity diagram.

In the Sequence diagram, we show for ex:

The "Actor" gives some inputs initally and the System will have some calculations, validations and finally it produces some output for the Actor. But in the sequence diagram we don't show the Actor interacting with all the parts of the diagramv (in Activity diagram we show). That is why, I have choosen activity diagram to represent this shopping cart example.

Please correct me if I am wrong.
About | Sitemap | Contact