Oosd Unit-1 Modelling
Oosd Unit-1 Modelling
What is UML?
UML: Unified Modeling Language
Use graphical notation: more clearly than natural language and code.
13
UML Diagram –
The Unified Modeling Language (UML) is a standard language for
14
Object-Oriented Modelling and
Design
⚫ Object-Oriented Modelling and Design is a way of
thinking about problems using models organized around
real world concepts. The fundamental construct is the
object, which combines both data and behaviour.
Objects
⚫ An object has:
⚫ The state of a bank account includes its account number and its
current balance
⚫ The behaviors associated with a bank account include the
ability to make deposits and withdrawals
⚫ Note that the behavior of an object might change its state
17
Objects
18
19
Objects
⚫ Software objects model read-world objects or abstract concepts
● dog, bicycle, Bank account
⚫ Real-world objects have states and behaviors
●Dogs' states: name, color, breed, hungry
●Dogs' behaviors: barking fetching
●Bicycle ‘s State :
●Bicycle’ s behavior :
⚫ Other examples of objects are:
⚫ myself – an instructor object.
⚫ you – a student object
⚫ this room – a room object
⚫ this university
⚫ your car, etc.
What is Object-Orientation about?
⚫ One of the key challenges faced by Computer Scientist is how to handle complexity.
⚫ Two main concepts used to manage complexity are Modularity and Abstractions.
⚫ Modularity means breaking a large system up into smaller pieces until each
peace becomes simple enough to be handled easily.
22
Identity
⦿ Identity means that data is organized into discrete,
distinguishable entities called objects.
23
24
Classification
⚫ It means that objects with same data structure (attribute) and
behavior (operations) are grouped into a class.
25
Classes – Example
Class
Attributes
Account
+Owner: Person
+Amount: double
+suspend()
+deposit(sum:double)
+withdraw(sum:double) Operations
26
Classes and Objects – Example
kirilAccount
Object +Owner=“CSE”
27
+Amount=25.0
Object-Oriented Methodology
⦿ The process for OO development and graphical notation for
representing OO concepts consists of building a model of an
application and then adding details to it during design.
The methodology has the following stages:
System conception : Software development begins with business
analysis or users conceiving an application and formulating tentative
requirements
Analysis : The analyst must work with the requestor to understand
the problem, because problem statements are rarely complete or
correct.
The analysis model is a precise abstraction of what the desired
system must do, not how it will be done.
It should not contain implementation decisions.
37
Object-oriented methodology
The analysis model has 2 parts:
Sharing (reuse)
49
MODEL
⚫ A model is an abstraction, before building any system a
prototype may be developed. The main purpose of model is
for understanding of the system.
54
Purpose of Modeling
Designers build many kinds of models for various purposes
before constructing things.
Visualization
Storyboards of movies, television shows and
advertisements let writers see how their ideas flow. They
can modify awkward transitions, and unnecessary
segments before detailed writing begins.
Purpose of Modeling
Reduction of complexity
The main reason for modeling is to deal with systems that
are too complex to understand directly. Models reduce
complexity by separating out a small number of important
things to deal with at a time.
Three models
We use three kinds of models to describe a system from different
view points.