2. Topics will be covered
What is an Object
What is Object Oriented Programming
Why Modeling Required
Modeling techniques
Object Modeling
Dynamic Modeling
Functional Modeling
Layered Architecture
2
3. What is Object
Object : An object is a real life example of material thing which can
be seen and felt. The object have specific behavior and attributes
Example any real life thing. Some of them as follows
Student
Car
Banking system
Body
Object can be categorized, described, organized, combined,
manipulated and created.
3
4. Example of Objects
4
Book
Title
Author
Publisher
Open ()
Close()
Read()
Person
Name
Address
Phone
ChangeName()
ChangeAddress()
ChangePhone()
Book
Physics
Book
Biology
Person 1
Ramesh
Objects of Book or person
Person 2
Suresh
6. Object Oriented Programming
Four main object-oriented programming concepts.
Data Abstraction
Encapsulation
Inheritance
Polymorphism
OOPS revolves around objects and classes
Class may be seen as Structures and functions
6
10. Why modeling
Before constructing a building, a designer first build a model.
To test a physical entity before actually building it.
To set the stage for communication between customers and developers.
For visualization i.e. for finding alternative representations.
For reduction of complexity in order to understand it.
10
12. Advantage of Modeling
A model provides a means for conceptualization and
communication of ideas in a precise and unambiguous form.
A model is an abstraction for the purpose of understanding it
before building it.
So a model is an abstraction that hides the non-essential
characteristics of a system and highlights those characteristics,
which are pertinent to understand it.
12
14. OMT stages and Models
14
Analysis
- Model of real-world situation
- What ?
System Design
- Overall architecture (sub-systems)
Object Design
- Refinement of Design
- Algorithms/data structures to
implement each class
Implementation
- Translation of object classes and
relationships to a particular
object-oriented language
time
System
ObjectModel
-Staticstructureofobjectsandtheirrelationships
(objectdiagram)
DynamicModel
-Controlaspectsofthesystem
(statediagrams)
FunctionalModel
-Datavaluetransforamtions
(dataflowdiagrams)
15. Types of Model
Object model
The object model represents the static and most stable phenomena in the
modeled domain. Main concepts are classes and associations, with attributes
and operations. Aggregation and generalization (with multiple inheritance) are
predefined relationships.
Dynamic model
The dynamic model represents a state/transition view on the model. Main
concepts are states, transitions between states, and events to trigger transitions.
Actions can be modeled as occurring within states.
Functional model
The functional model represents flow of values from external inputs, through
operations and internal data stores, to external outputs.
15
17. Object Modeling
The object model provides the framework into which the other
models are placed.
Build an Object Model:
Identify object classes.
Develop a data dictionary for classes, attributes, and associations.
Add associations between classes.
Add attributes for objects and links.
Organize and simplify object classes using inheritance.
Group classes into modules, based on close coupling and related function.
17
18. Object and Class
A class is defined as Collection of similar objects. It is a template
where basic characteristics of set of objects is defined.
Defines attributes and Operations i.e. member variables and
functions.
Defining a class does not define any object, but it only creates a
template.
For creating object basically create instance of class.
18
21. Aggregation
If two parts are linked but they have their individuality then its
association and if two parts have whole-part relationship then it is
aggregation.
Like of whole is affected part will be affected
21
29. Dynamic Model
Build a Dynamic Model:
Prepare scenarios of typical interaction sequences.
Identify events between objects and prepare an event trace for each
scenario.
Prepare an event flow diagram for the system.
Develop a state diagram for each class that has important dynamic behavior.
Check for consistency and completeness of events shared among the state
diagrams.
29
30. Identify Use Cases for library class
30
Inquiry for Membership
Search Book
Request for book issue
Request for book return Pay Fine
31. Identify use case for library class
31
Issue member card
Cancel membership
Issue Book
Return Book
Maintain Book Record
Update member card
Update Book
Remove
Book
Add Book
32. ATM define Class attributes and behaviour
32
Screen
Display
Message()
Deposit
Double: Amount
Execute()
Withdrawal
Double: Amount
Execute()
Balance Enquiry
Execute()
Bank database
Authenticate
User()
getBalance()
Credit()
Debit()
Keypad
GetInput()
Transaction
Int:Account Number
Execute()
getAccountNumber()
Account
Int: Account
Number
Int Pin
Double:Balance
validatePin()
getBalance()
Credit()
Debit()
Cash dipenser
Int: amount
DispenseCash()
IsCashAvailable()
33. Define classes attributes and Behavior
33
Book
ID: Int
Name: Char
Author: Char
Year of Publication: Char
Price: Char
Status: Char
Char: Category
Add New Books()
DeleteBooks()
UpdateBookDetails()
DisplayBookDetails()
UpdateStatus()
Librarian
ID: Int
Name: Char
IssueBooks()
ReturnBooks()
SearchBooks()
VerifyMember()
PayBills()
OrderBooks()
IssueIDCards()
ManageBookReecord
Publisher
Int :Publisher ID
Char : Publisher Name
Char : Publisher Address
Int: Publisher No.
AddPub()
ModifyPub()
DeletePub()
OrderStatus()
User
Int :User ID
Char : User Name
Char : User Address
Int: Phone No.
IssueBooks()
ReturnBooks()
PayFine()
AddNewUser()
DeleteUser()
UpdateDetails()
38. Functional Modeling
Build a Functional Model:
Identify input and output values.
Use data flow diagrams as needed to show functional dependencies.
Describe what each function does.
Identify constraints.
Specify optimization criteria.
38
39. Function Modeling
Data Flow Diagrams are composed of the four basic symbols – external entities,
processes, data stores and data flow - as discussed below.
The External Entity symbol represents sources of data to the system or
destinations of data from the system.
The Process symbol represents an activity that transforms or manipulates
the data (combines, reorders, converts, etc.).
The Data Store symbol represents data that is not moving (delayed data at
rest).
The Data Flow symbol represents movement of data.
39
40. DFD for issuing pay check
40
DFD for a system that pays to
worker:
Input Data Flow: Timesheet
Hours(Source is Worker)
Basic Output: Pay check
Process: Employee's record is
retrieved, using the employee ID,
which is contained in the timesheet.
From the employee record, the rate
of payment and overtime are
obtained.
42. Layered Architecture
42
UI layer
(Forms or view displayed at front end)
Business Layer
(Contains business logic)
Data Layer
(Manages DB, or File operation)
DB File
Send
Reqeust
Receive
Response
Set/Get Data
Output Data/
reesponse
43. Advantages of Layered Architecture
Reduced complexity
Easy to add or modify functionality
Easy to Debug and Test
Increase Reusability
43
45. Reverse Engineering
45
It is a technique to understand through analysis of its structure,
Function and operation.
The concept behind reverse-engineering—breaking something
down in order to understand it, build a copy or improve it.
It is easy to learn by putting things apart and rejoining that
Helps in Estimate costs.
Reverse Engg is done because documentation is not available
46. Forward vs Reverse Engineering
46
Analysis
Design
Implementation
Reverse
engineering
Forward
engineering
Documentation
Debugging is
important
factor in RE
47. Benefits for RE
Understand existing design
Quality improvement
Software reuse
No need to start from scratch
To examin how product works , what components it consists ,
estimate costs.
Reverse Engg is done because documentation is not available
47
48. Out Come of reverse engineering
Document explaining:
Code structure – classes, structures and its relation
Functionality – Understanding functionality of module
Input for Estimation
Improvement points
48