UML Diagrams must meet the following general requirements:
- Avoid non-standard abbreviations. "App" is fine, but most other
abbrevations are not. They make code hard to maintain because other
developers have to remember which abbreviations you prefer.
- All classes should be associated with at least one other class.
Domain-level class diagrams must meet the following requirements:
- Designs need to be independent of a programming language; do not
include Java-specific classes
- Do show inheritance, attributes, methods, relationships,
multiplicities, role names (when they add information).
- This means you would not use Java-specific classes
like LinkedList or Map. Just use a one-to-many
relationship between an object (like a Bus) and the objects it contains
(like a Passenger).
- Also, do not include a class that simply contains a static
main; this is also a Java-specific concept.
- Use generic associations. Aggregation vs. composition is an
design issue (reflecting data lifetimes), not a
problem-description issue.
- Do not show directionality; this is also a design issue.
- Do not specify types; they add clutter and obscure the important
concepts for clients.
- Do not include constructors, getters, and setters.
Very high level domain diagrams may even omit attributes and operations;
ask if you are not sure if they should be included.