This is our Object Oriented Programme course presentation slide which was compeletly made by me.I think it will help others to clear their concept about this.
3. What Is Modeling?
⢠A model is a simplification with a purpose
⢠Use precisely defined notation to describe and simplify a
complex and interesting structure, phenomenon, or
relationship
⢠Real-world examples
⢠The solar system model
⢠Mathematical models
3
4. What Is Modeling? (contâd)
⢠Simplification
⢠Less complex, more accessible
⢠Varying perspectives
⢠Describe the system from different perspectives
⢠Help developers manage complexity
⢠Common notation
⢠To facilitate communication
⢠Allows developers to combine their efforts and to work in parallel
4
5. UML
⢠Unified Modeling Language
⢠A language for specifying, visualizing, constructing, and documenting the
artifacts of software systems
⢠A set of precise notations
⢠Helps developers create ideas and communicate them
5
6. UML
The Basics
Abstraction
⢠A simplification or model of a complex concept, process, or real-world
object
⢠Help people understand something at an appropriate level
⢠Different people would build different abstractions for the same
concept
⢠Highlight the characteristics and behavior of something that is too
complex to understand in its entirety
6
7. UML
The Basics
Encapsulation
⢠Highlight the important aspects of an object
⢠Hide the cumbersome internal details of the object
⢠Make the system easier to understand and to reuse
⢠Make a system more extendible
7
8. UML
The Basics
Union of all Modeling Languages
ďąUse case diagrams
ďąClass diagrams
ďąObject diagrams
ďąSequence diagrams
ďąCollaboration diagrams
ďąStatechart diagrams
ďąActivity diagrams
ďąComponent diagrams
ďą Deployment diagrams
ďąâŚ.
8
9. UML
The Basics
⢠Object
⢠A particular and finite element in a large model
⢠Visible or invisible
⢠Persistent or transient
⢠State: describes characteristics and current condition
⢠Behavior: defines the actions that other objects may perform on the
object
⢠Method: a service or responsibility that an object exposes to other
objects
⢠Each has a unique identifier
⢠Limited responsibility and cooperation
myCar : ToyotaTercel
9
11. Relationships between objects
Dependency
⢠Short-term dependency
⢠An object may create another object as part of a method, ask it to
perform some function, and then forget about it
11
12. Relationships between objects
Association
⢠An object keeps a reference to another object and can call the objectâs,
methods as it needs them
⢠An object may receive an object as a parameter to a configuration
method and keep a reference to the object
12
13. Relationships between objects
Aggregation
⢠An object is part of a greater whole
⢠The contained object may participate in more than one aggregation
relationship, and exists independently of the whole
13
14. Relationships between objects
Composition
⢠An object is owned by a greater whole
⢠The contained object may not participate in more than one composition
relationship and cannot exist independently of the whole
14
15. UML
The Basics
⢠Class
⢠A group of objects that have something in common
⢠Captures a particular abstraction
⢠Provides a template for object creation
⢠Each objects created from a class is identical in
⢠The type of data they can hold
⢠The type and number of objects they know about
⢠The logic for any behavior they provide
+attackKenDoll()
-name : String
-rank : String
#carryingRifle : Boolean
ToySoldier
15
16. UML
The Basics
⢠Class Attributes
-Represent the named properties of a UML class
-UML class can have many attributes of different names
-Attributes name is generally a short noun or a noun phrase written in lower Case
first text.
-Attribute decleration may include visility , type
and initial value : +attributesName: type = initial-value
16
17. UML
The Basics
Class Operations
-Represent named services provided by a UML class
-UML class can have many operations of different names
-Operation name is generally a short verb or a verb phrase written in
lowCase-first text
-Operation may include visibility , parameters and return type:
+opName(param1 : type = initial_value) :return_type
17
18. UML
The Basics
Class Visibility
-Three levels of class ,attribute and operation visibility:
ď private(-), available only to the current class
ďProtected(#) , available to the current and inherited classes
ďPublic(+), available to the current and other classes.
18
19. UML
The Basics
⢠Class Generalization
ďRepresent a relation between a parent (a more abstract class ) and a child ( a
more specific class)
ďGenerally referred to as a â is -a âkind-ofâ relationship
ďChild object may be used instead of parent objects since they share
attributes and operations: the opposite is not true
19
20. Relationships between Classes
Generalization: an inheritance relationship
ď inheritance between classes
ď interface implementation
Association: a usage relationship
ď Dependency
ď Aggregation
ď Composition
20
21. Generalization relationships
⢠Inheritance : class B is a Class A (or class A is extended by class B)
⢠Realization : class B realizes Class A (or class A is realized by class B)
21
22. Associational Relationship
⢠associational (usage) relationships
1. multiplicity(how many are used)
* â0, 1, or more
1â1 exactly
2..4âbetween 2 and 4, inclusive
3..*â3 or more
2. name(what relationship the objects have)
3. navigability(direction)
22
24. Multiplicity of associations
One-to One
*each student must carry exactly one ID card
One-to-many
*one rectangle list van contain many rectangles
24
26. Modeling Software Systems with the UML
⢠UML enables building a single coherent model that describes a software system
from several perspectives
⢠Internal consistency
⢠Distinct views
⢠Participants can use the same model and speak the same language throughout
the development process
26
27. Modeling Process
1. The developers and customers use the UML to understand the problem
from the customerâs point of view
2. The developers use UML to understand the problem from their own point of
view
3. The UML model is used as a resource by the implementers of the system
27
28. Modeling Process (contâd)
⢠Requirements gathering
⢠Analysis
⢠Technology selection
⢠Architecture
⢠Design and implementation
28
29. Design and Implementation
⢠Design
⢠Use all the results from the previous steps
⢠Create a model of objects that interact to provide the systemâs functionality
⢠The last chance to validate the solution
⢠Implementation
⢠Write the code according to the design
END
29