Class Diagrams
Create class diagrams and package diagrams showing classes, attributes, methods, and their relationships using ERD tables.
Class diagrams document the structure of object-oriented code, showing classes, their attributes and methods, and relationships between classes. NeoArc uses ERD tables to approximate class notation.
Class Diagram Elements
A class diagram typically includes:
Creating Class Diagrams with ERD Tables
Relationship Types
Use different line endings for relationships:
| Relationship | Line Ending |
|---|---|
| Association | Simple line, optional arrowhead |
| Inheritance | Line with hollow triangle (arrow-outline ending) |
| Composition | Line with filled diamond |
| Aggregation | Line with hollow diamond |
| Dependency | Dashed line with arrow |
Package Diagrams
Package diagrams show modules and their dependencies:
Creating Package Diagrams
Auto-Layout for Class Diagrams
Use NeoArc's auto-layout for class diagrams:
| Layout | Description |
|---|---|
| UML Class Left-to-Right | Hierarchical layout for inheritance |
| Force-Directed | Organic layout based on relationships |
Best Practices
Focus on Key Classes
Do not show every class.
Group Related Classes
Use visual proximity or boundaries.
Show Important Relationships
Not every association.
Keep Diagrams Focused
One diagram per module or subsystem.
Link to Code
Use lineage linking to source files.
Generate from Code
Consider reverse engineering tools.