Object-oriented analysis and
design
SENG 123:
Introduction to Computer Software Engineering
By
Atilla Elçi
14.12.2020 Intro Comp SWE 1
WEEKLY SCHEDULE
Week Topics PPTs Text
1 Intro to the course;
An overview of software engineering concepts
Intro;
Concepts
Preface;
Ch.1
2 Engineering, software engineering, ethics Engin…
3 Software development life cycle SDLC Ch.2
4 Software development life cycle SDLC Ch.2
5 Practical UML -
6 Requirements analysis and software
specification
Req Ch.3
7 Midterm Examination Week 25.11.2020 18:00-21:00
8 Software development project management PM Ch.4- 1st half
9 Software project analysis and design SAD Ch.5
10 Object-oriented analysis and design OOAD Ch.6- 1st half
11 Interfaces, dialogs, and database
12 coding and debugging; software testing
13 Implementation and maintenance; reliability and
quality
14 Review; Q & A.
14.12.2020 Intro Comp SWE 2
Here
we
are!
14.12.2020 Intro Comp SWE 3
Object-Oriented Analysis and Design
• Three approaches to A&D:
1. Procedure-(/Function-)oriented
2. Data-oriented
3. Object-oriented: combining both into an ‘object’
• Objects: things an IS deals with, e.g., chairs,
customers, pens, payrol slip, wheather
forecast, …
• An object-oriented system is made up of
interacting objects that maintain their local
state and provide operations on that state.
14.12.2020 Intro Comp SWE 4
Object orientation
14.12.2020 Intro Comp SWE 5
• OO approach: Create a set of classes
(including attributes, then expand by
adding capabilities(/behaviours)
• Class versus object:
– Class is a category
– Object is an instance in a category
– Class is used as template to create
objects
• A software model is a collection of
classes (therefore also of behaviors)
• Let’s work out some examples of
classes and objects:
– Person: Berke
– Car: Toyota RAV4, Renault Megane
– …
Name
Attributes
Behaviors
OO Paradigm concepts
• Abstraction: essential attributes and behaviors of a class required for the
model
• Encapsulation, info hiding: Inside of an object cannot be seen but can only
be used by calling its behaviors.
• Inheritance: In a hierarchy of classes, a subclass inherits its superclass’s
attributes and behaviors.
• Generalization/Specialization: same as inheritance
• Polymorphism: a behavior name appearing in different classes will mean
different operation as assigned in class definition.
• Messages: objects interwork by sending messages to each other.
• Association: objects are associated (linked) to others by unidirectional,
bidirectional, one-on-one, one-to-many associations
– Let’s study Figures 6.12-18.
• Aggregation/composition: A class may be a collection of other classes.
14.12.2020 Intro Comp SWE 6
OOAD Paradigm
• Object-oriented strategy (/paradigm) implements in succession the
following (see Fig. 6.23):
– OO analysis: develops an OO model of the problem
– OO design: develops an OO model of the solution
– OO programming: develops the model using an OO language.
• This strategy reduces SDLC to OODLC (see Fig. 6.24):
– OO analysis
– OO design
– Object implementation
• Essentially all are summarized in using UML!
14.12.2020 Intro Comp SWE 7
OOAD: UML Diagrams
• Use Case Diagram: let’s study Figs 6.30 & 31
• Class Diagram: let’s study Fig. 6.32
14.12.2020 Intro Comp SWE 8
Readings on OOAD
• OOAD:
– Quick guide:
• https://www.tutorialspoint.com/object_oriented_analy
sis_design/ooad_quick_guide.htm
– Detailed:
• https://www.tutorialspoint.com/object_oriented_analy
sis_design/index.htm
14.12.2020 Intro Comp SWE 9
Terminology - Terimler continued
• Object-Oriented Analysis and
Design: Nesne-yönelimli
çözümleme ve tasarım
• OOAD: NYÇT
• X-oriented: X-yönelimli
• Procedure-oriented: süreç-
yönelimli
• Data-oriented: veri-yönelimli
• Object-oriented: nesne-
yönelimli
• Implementation:
gerçekleştirme
• Behavior: davranış
• Function: işlev
• Abstraction: soyutlama
• Encapsulation, info hiding: bilgi
gizleme
• Inheritance: kalıt, miras
• Generalization/Specialization:
genelleştirme/özelleştirme
• Polymorphism: çok biçimlilik
• Message: ileti
• Association: ilişki
• Unidirectional: tek yönlü
• Bidirectional: iki yönlü
• one-on-one: bire bir
• one-to-many: bire çok
• Aggregation/composition:
birleştirme
14.12.2020 Intro Comp SWE 10
Homework
• Answer the following Qs in terms of OO Paradigm concepts
reference Figure 6.36: The detailed class diagram of elevator
problem:
– How many classes are there in this class diagram?
– What is the relationship between Button Class and Elevator Button
Class?
– What are Elevator Button Class and Floor Button Class to Button Class?
– What is the cardinality of the relationship between Elevator Button
Class and Elevator Control Class? What about Elevator Doors Class and
Elevator Control Class?
– Both Elevator Button Class and Floor Button Class have turnOffButton
and turnOnButton functions. What OO paradigm concept does that
signify?
– What does the ‘Controls’ indication mean?
14.12.2020 Intro Comp SWE 11
These are FYI!
• Microsoft: Turning Excel into a Turing-
complete programming language:
– https://www.techrepublic.com/article/microsoft-
turning-excel-into-a-turing-complete-
programming-language/
14.12.2020 Intro Comp SWE 12

Seng 123 8-ooad

  • 1.
    Object-oriented analysis and design SENG123: Introduction to Computer Software Engineering By Atilla Elçi 14.12.2020 Intro Comp SWE 1
  • 2.
    WEEKLY SCHEDULE Week TopicsPPTs Text 1 Intro to the course; An overview of software engineering concepts Intro; Concepts Preface; Ch.1 2 Engineering, software engineering, ethics Engin… 3 Software development life cycle SDLC Ch.2 4 Software development life cycle SDLC Ch.2 5 Practical UML - 6 Requirements analysis and software specification Req Ch.3 7 Midterm Examination Week 25.11.2020 18:00-21:00 8 Software development project management PM Ch.4- 1st half 9 Software project analysis and design SAD Ch.5 10 Object-oriented analysis and design OOAD Ch.6- 1st half 11 Interfaces, dialogs, and database 12 coding and debugging; software testing 13 Implementation and maintenance; reliability and quality 14 Review; Q & A. 14.12.2020 Intro Comp SWE 2
  • 3.
  • 4.
    Object-Oriented Analysis andDesign • Three approaches to A&D: 1. Procedure-(/Function-)oriented 2. Data-oriented 3. Object-oriented: combining both into an ‘object’ • Objects: things an IS deals with, e.g., chairs, customers, pens, payrol slip, wheather forecast, … • An object-oriented system is made up of interacting objects that maintain their local state and provide operations on that state. 14.12.2020 Intro Comp SWE 4
  • 5.
    Object orientation 14.12.2020 IntroComp SWE 5 • OO approach: Create a set of classes (including attributes, then expand by adding capabilities(/behaviours) • Class versus object: – Class is a category – Object is an instance in a category – Class is used as template to create objects • A software model is a collection of classes (therefore also of behaviors) • Let’s work out some examples of classes and objects: – Person: Berke – Car: Toyota RAV4, Renault Megane – … Name Attributes Behaviors
  • 6.
    OO Paradigm concepts •Abstraction: essential attributes and behaviors of a class required for the model • Encapsulation, info hiding: Inside of an object cannot be seen but can only be used by calling its behaviors. • Inheritance: In a hierarchy of classes, a subclass inherits its superclass’s attributes and behaviors. • Generalization/Specialization: same as inheritance • Polymorphism: a behavior name appearing in different classes will mean different operation as assigned in class definition. • Messages: objects interwork by sending messages to each other. • Association: objects are associated (linked) to others by unidirectional, bidirectional, one-on-one, one-to-many associations – Let’s study Figures 6.12-18. • Aggregation/composition: A class may be a collection of other classes. 14.12.2020 Intro Comp SWE 6
  • 7.
    OOAD Paradigm • Object-orientedstrategy (/paradigm) implements in succession the following (see Fig. 6.23): – OO analysis: develops an OO model of the problem – OO design: develops an OO model of the solution – OO programming: develops the model using an OO language. • This strategy reduces SDLC to OODLC (see Fig. 6.24): – OO analysis – OO design – Object implementation • Essentially all are summarized in using UML! 14.12.2020 Intro Comp SWE 7
  • 8.
    OOAD: UML Diagrams •Use Case Diagram: let’s study Figs 6.30 & 31 • Class Diagram: let’s study Fig. 6.32 14.12.2020 Intro Comp SWE 8
  • 9.
    Readings on OOAD •OOAD: – Quick guide: • https://www.tutorialspoint.com/object_oriented_analy sis_design/ooad_quick_guide.htm – Detailed: • https://www.tutorialspoint.com/object_oriented_analy sis_design/index.htm 14.12.2020 Intro Comp SWE 9
  • 10.
    Terminology - Terimlercontinued • Object-Oriented Analysis and Design: Nesne-yönelimli çözümleme ve tasarım • OOAD: NYÇT • X-oriented: X-yönelimli • Procedure-oriented: süreç- yönelimli • Data-oriented: veri-yönelimli • Object-oriented: nesne- yönelimli • Implementation: gerçekleştirme • Behavior: davranış • Function: işlev • Abstraction: soyutlama • Encapsulation, info hiding: bilgi gizleme • Inheritance: kalıt, miras • Generalization/Specialization: genelleştirme/özelleştirme • Polymorphism: çok biçimlilik • Message: ileti • Association: ilişki • Unidirectional: tek yönlü • Bidirectional: iki yönlü • one-on-one: bire bir • one-to-many: bire çok • Aggregation/composition: birleştirme 14.12.2020 Intro Comp SWE 10
  • 11.
    Homework • Answer thefollowing Qs in terms of OO Paradigm concepts reference Figure 6.36: The detailed class diagram of elevator problem: – How many classes are there in this class diagram? – What is the relationship between Button Class and Elevator Button Class? – What are Elevator Button Class and Floor Button Class to Button Class? – What is the cardinality of the relationship between Elevator Button Class and Elevator Control Class? What about Elevator Doors Class and Elevator Control Class? – Both Elevator Button Class and Floor Button Class have turnOffButton and turnOnButton functions. What OO paradigm concept does that signify? – What does the ‘Controls’ indication mean? 14.12.2020 Intro Comp SWE 11
  • 12.
    These are FYI! •Microsoft: Turning Excel into a Turing- complete programming language: – https://www.techrepublic.com/article/microsoft- turning-excel-into-a-turing-complete- programming-language/ 14.12.2020 Intro Comp SWE 12