UML Class Diagrams
class name, variables, methods
sections of a UML diagram
<<abstract>>
stereotype which denotes abstract
<<new>>
stereotype which denotes constructor
<<final>>
stereotype which denotes final
<<interface>>
stereotype which denotes interface
<<override>>
stereotype which denotes override
visibility name : type
format of variables (attributes)
UML (Unified Modeling Language) diagram
> diagram which are used to visualize classes and their associations > broken up into three sections - class name - variables - methods
stereotype
> optional, additional information that is included with methods > <<new>> denotes constructor > <<abstract>> denotes abstract > <<override>> denotes override > <<interface>> denotes interface > <<final>> denotes final
methods (operations)
> section name in which methods (operations) of the class are listed with their return type and visibility modifier > static variables are underlined > contents are written as visibility [<<stereotype>>] methodName(param1: type, param2: type): returnType
variables (attributes)
> section name in which variables (attributes) are listed with their corresponding type as well as visibility modifier > static variables are underlined > contents are written as visibility name : type
class name
> section of the UML diagram in which the fully qualified name of the class is given > if multiple classes are given and assumed to be in the same package, the simple name is used instead > abstract classes are denoted by italicization, or prefixed with the <<abstract>> stereotype
fully qualified
If a single class exists in the UML diagram, the ________________ name is used.
simple
If multiple classes exist in a UML diagram, the __________________ name is used.
italics
In a UML diagram, abstract classes are denoted with _______ or prefixed with the <<abstract>> stereotype.
underlined
In a UML diagram, static variables are ___________.
SomeClass implements SomeInterface
association represented by a dashed line; unfilled triangle arrowhead
ClassA uses ClassB
association represented by a solid line; open arrowhead
Child extends Parent
association represented by a solid line; unfilled triangle arrowhead