Lecture Notes
Examples of extends in use case:
CLASS DIAGRAMS
This is part of the second ass.
Meant to construct Conceptual model of the system.
It shows concepts, associations bw/ concepts
Describes WHAT is there.
Part of the difficulty of OO is deciding what needs to be modelled.
Better to over specify than under specify.
Three perspectives
Conceptual OO Analysis
. used in initial analysis
.
.
Specification OO Design
. does describe software
. describes the interface of the software, NOT the implementation
Implementation
Identifying Concepts.
The literature asks how do people become OO programmers?
They learn C.. then C++... but you could just keep on writing procedural. It's about identifying concepts. You could try mirroring the concepts of the real world in our software.
Look for the nouns when trying to identify concepts.
Components of a Class diagram
Classes, associations etc. See notebook or the link through Joel's site.
Attributes and operations
Associations
Take care with Association Multiplicity.
The world is a very complex place though.
Whole/Part Associations
Composition - aggregation
Some say that the important issue is with the cascading delete. If you destroy an object representing an aggregation, you do not need to destroy the other members. HOWEVER if it is a composite, you do have to destroy all the other members!
This is not entirely decided on, but the important thing is to choose a convention and stick to it.
So. Composition.
Structs, records
Common in real life, so common in software too.
Bike has a frame, wheel, seat
Email has a header, main txt. The header is composed of a from, to line etc.
The compound object does not exist without its components
Aggregation
A forest is an aggregate of trees
A flock is an aggregate of sheep.
A flock an exist even if there is only one sheep! You can even have an empty flock, or a Tasmanian forest.
Aggregation is a group/member association.
Generalisation
At the conceptual level, we can say that a class is a subtype of another class
Book is a subclass of product at Amazon.
These are extremely content dense lectures!
Dependency
One change can affect another part of the system.
Constraints
Place these inside { }
{ordered} {abstract} are typical constraints.
0 Responses to “Lecture: UML”
Leave a Reply