Win a copy of Rust Web Development this week in the Other Languages 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

what are the difference between class diagram and sequence diagram?

 
Ranch Hand
Posts: 594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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/
 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Class diagram :
You can use a class diagram to illustrate the relationships between the classes.

Sequence diagram :
Sequence diagram lets you show the messages sent among the instances of these classes and the order in which they are sent.

For more information,refer the following link :
https://www.techrepublic.com/article/class-and-sequence-diagrams-work-together-to-allow-precise-modeling/
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A class diagram shows a set of classes, interfaces and their relationships and illustrates the static design view of a system, whereas sequence diagram shows the sequence of actions that occurs in a system and illustrates the dynamic view of a system. Sequence diagrams
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic