0% found this document useful (0 votes)
7 views16 pages

Module 03

The document covers Object Oriented Analysis and Design, focusing on key concepts such as classes, instance attributes, methods, static methods, class methods, inheritance, and abstract classes. It also introduces UML diagrams, including structure, behavior, and interaction diagrams, which are essential for describing object-oriented systems. The module emphasizes the importance of treating everything as an object and understanding the relationships between classes.

Uploaded by

kalamkumar22
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views16 pages

Module 03

The document covers Object Oriented Analysis and Design, focusing on key concepts such as classes, instance attributes, methods, static methods, class methods, inheritance, and abstract classes. It also introduces UML diagrams, including structure, behavior, and interaction diagrams, which are essential for describing object-oriented systems. The module emphasizes the importance of treating everything as an object and understanding the relationships between classes.

Uploaded by

kalamkumar22
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Object Oriented Analysis and Design

module 03
Dr Abu-Eesa
Islamic Online University
Module 03

 Treating everything as an object…


 Everything has a class!
 Caution using __init__
 Instance attributes and methods
 Static methods
 Class methods
 Inheritance
 Abstract Classes
 Inheritance and the LSP
 Summary
Treating everything as an object…

 def:Defines things
 class: define class
 What is a class: logical grouping of data and functions
Everything has a class!

 Customer example
 self
 __init__
Caution using __init__
Instance attributes and methods

 We said functions within a class called a “method”


 Methods can access all data within on the instance of the object,
anything set on self can be accessed and modified
 Due to being set on self, they must be instance of the class to be used
 Hence often called “instance methods”
Static methods

 Class attributes: class level


Class methods

 Variant of static method


 Passed to the class rather than receiving the instance as the first
parameter
 Defined using a decorator
Inheritance

 Parent class
 Child class: has everything parent has and we can add more
Abstract Classes

 Vehicle not real world object!


 It is a concept that some real world objects embody
Inheritance and the LSP
To summarise…
UML Diagrams

 Unified modelling language -- A Notation for Describing Object-Oriented


Systems
 Structure diagrams
 Behaviour diagrams
 Interaction diagrams
Structure Diagrams

 Class diagrams
 Composite structure diagrams
 Component diagrams
 Deployment diagrams
 Object diagrams
 Package diagrams
Behaviour Diagrams

 Activity
 Use case diagrams
 State machine diagrams
Interaction Diagrams

 Sequence diagrams
 Timing diagrams
 Communication diagrams
 Interaction overview diagrams

You might also like