Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

what are the difference between class diagram and sequence diagram?

 
Ranch Hand
Posts: 588
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are the difference between class diagram and sequence diagram?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouldn't just looking at an example of both diagram types answer that question?!

When I do an image search for both I get a number of great examples. Do you really not see a difference?
 
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple answer:
Class diagram -> static diagram
Sequence diagram -> Dynamic diagram
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look in the Java code which has been generated from diagrams then you can notice that the class diagram usually model classes or packages while a sequence diagram is modeling methods.

Class diagram example: http://www.ejb3.org/class_diagram.png
Sequence diagram example : http://www.ibm.com/developerworks/rational/library/3101.html
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

jacob deiter wrote:what are the difference between class diagram and sequence diagram?



- Class diagram: It is a UML diagram that illustrates classes, interfaces, and their associations. And, it is used for static object modeling.
- Sequence diagram: It is a UML diagram that illustrates how objects (Instance of a class) interact with each other. And, it is used for dynamic object modeling.

Reference:

Applying UML and Patterns, Craig Larman

[jc: Corrected the name of Mr. Larman]
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For future readers of this thread:

You can get a very solid idea about sequence diagramming with this comprehensive guide

http://creately.com/blog/diagrams/sequence-diagram-tutorial/
 
I am a man of mystery. Mostly because of this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic