Definition: Object Modeling
• Main goal: Find the important abstractions
• What happens if we find the wrong abstractions?
Iterate and correct the model
• Steps during object modeling
1. Class identification
Based on the fundamental assumption that we can find abstractions
2. Find the attributes
3. Find the methods
4. Find the associations between classes
• Order of steps
Goal: get the desired abstractions
Order of steps secondary, only a heuristic
Iteration is important
Class Identification
• Identify the boundaries of the system
• Identify the important entities in the system
• Class identification is crucial to object-oriented modeling
• Basic assumption:
1. We can find the classes for a new software system (Forward Engineering)
2. We can identify the classes in an existing system (Reverse Engineering)
• Why can we do this?
Philosophy, science, experimental evidence
Class identification is an ancient problem
• Objects are not just found by taking a picture of a scene or domain
• The application domain has to be analyzed.
• Depending on the purpose of the system different objects might be found
How can we identify the purpose of a system?
Scenarios and use cases
• Another important problem: Define system boundary.
What object is inside, what object is outside?
Pieces of an Object Model
• Classes
• Associations (Relations)
Part of- Hierarchy (Aggregation)
Kind of-Hierarchy (Generalization)
• Attributes
Detection of attributes
Application specific
Attributes in one system can be classes in another system
Turning attributes to classes
• Methods
Detection of methods
Generic methods: General world knowledge, design patterns
Domain Methods: Dynamic model, Functional model
Object vs Class
• Object (instance): Exactly one thing
The lecture on September 7 on Software Engineering from 9:00 -10:20
• A class describes a group of objects with similar properties
IETM, Author, Corrosion, Work order
• Object diagram: A graphic notation for modeling objects, classes and their relationships ("associations"):
Class diagram: Template for describing many instances of data. Useful for taxonomies, patters, schemata...
Instance diagram: A particular set of objects relating to each other. Useful for discussing scenarios, test cases and examples
• Together-J: CASE Tool for building object diagrams, in particular class diagrams
Lecture on September 2
UML: Class and Instance Diagrams
Links and Associations• Links and associations establish relationships among objects and classes.
• Link:
A connection between two object instances. A link is like a tuple.
A link is an instance of an association
• Association:
Basically a bidirectional mapping.
One-to-one, many-to-one, one-to-many,
An association describes a set of links like a class describes a set of objects.
Mesin Pecari Google
Rabu, 18 Februari 2009
Langganan:
Postingan (Atom)