Chapter 4 - Models Flashcards
Formal Methods
These methods use a mathematical notation—based on logic, set theory, or Petri Nets, for example—to derive formal specifications for software systems.
Unified Modeling Language (UML)
a graphical notation for software modeling
CASE tools (Computer-Aided Software Engineering)
tools emerged to create and edit UML diagrams
UML as blueprint
after the requirements specification phase, a set of models—or blueprints—used to be produced to document various aspects of a system
UML as programming language
The goal was to automatically generate code from UML models. This approach is also known as Model-Driven Development (MDD)
UML as sketch
we use UML to build light and informal diagrams of parts of a system, hence the name sketch
Forward Engineering
developers use UML to discuss design alternatives before any code is written
Reverse Engineering
developers use UML to analyze and discuss a feature that is already implemented in the code.
Static (or Structural) Diagrams
model the structure and organization of a system, including information about classes, attributes, methods, packages, and more
Dynamic (or Behavioral) Diagrams
model events that occur during a system’s execution. For example, they can model a sequence of method calls.
Class diagrams
They provide a visual representation of a set of classes, offering information about attributes, methods, and relationships among these classes. In a class diagram, each class is represented by a rectangle with three compartments. These compartments contain the class name (usually in bold), attributes, and methods.
Associations
When class A has an attribute b of type B, we say there is an association from A to B, represented by an arrow from A to B
multiplicity
indicates how many objects can be associated with the attribute responsible for the association.
composition
the destination class cannot exist independently of the source class
aggregation
when the two classes have independent life times
Inheritance
represented using arrows with an unfilled end. These arrows connect subclasses to their base class.
subclasses inherit all the attributes and methods from the base class, while also being able to add new ones
dependency
A dependency exists from class A to class B, represented by a dashed line from A to B, when class A uses class B, but this use is not through an association (i.e., A does not have an attribute of type B) or inheritance (i.e., A is not a subclass of B). Dependencies occur, for example, when a method in A has a parameter or local variable of type B or when a method in A throws an exception of type B.
Package diagrams
recommended when we want to provide a higher-level view of a system, showing only groups of classes—that is, packages—and the relevant dependencies among them
Sequence Diagrams
dynamic diagrams, also known as behavioral diagrams. Rather than modeling classes, they model objects within a system. Additionally, they provide information about the methods that are executed in a specific usage scenario of a program.
Activity Diagrams
represent, at a high level, a business process flow. The main elements of these diagrams are actions, represented by rectangles. There are also control elements that define the execution order of the actions.