class diagrams Flashcards
unified modelling language
diagrams for designing systems
dynamic uml
embraces the executable behaviour of a system
static uml
structural aspects of the system
what are 3 reasons for why we use uml
frequently used in the industry
easier to fit more information in less space compared to code
fast to create and reason about
+
public
-
private or protected
what are the 3 class diagrams perspectives
conceptual; identify the classes
specification; basic set of data and operations
implementation; what kind of code youll need
1
exactly 1
0..1
0/1
*
many
0..*
0/many
1..*
at least one/many
association
shows that two classes need to pass data between eachother
how is association represented
a straight line
aggregation and how is it represented
the parent and child can exist independently
line with a hollow diamond
what is composition and how is it represented
the child cannot exist without the parent
line with filled in diamond
generalisation/inheritance
when a child class inherits attributes and methods from a parent class
abstract class
defined methods and attributes without implementing them
can have a mix of abstract and concrete methods
concrete class
provides the implementation for an abstract class
realisation/implements
implementing interface classes
a class can implement multiple interfaces (have multiple behaviours) and must match method signatures of all interfaces that its implementing
polymorphism
allows the same method to be used differently depending on the object its acting on