ooad - shiningstudy€¦ · ooad lecture#1 ms. hina . prerequisite oop. oop(object oriented...
TRANSCRIPT
![Page 1: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/1.jpg)
OOAD
Lecture#1
Ms. Hina
![Page 2: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/2.jpg)
Prerequisite
OOP
![Page 3: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/3.jpg)
OOP(OBJECT ORIENTED
PROGRAMMING)
– Oop concepts
– Classes
– Objects
– Methods and constructors
– Instances
– Polymorphism
– Inheritance
– Encapsulation
– interfaces
![Page 4: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/4.jpg)
classes
– A class is a template, or blueprint, from which objects are created.
– Objects are used to implements the classes.
Public class house
{
}
![Page 5: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/5.jpg)
objects
Object is instance the of the class which has all the properties of its respective
class
Class_name object_name=new constructor();
![Page 6: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/6.jpg)
methods
– A method is a set of code which is referred to by name and can be called at any
point in a program simply by utilizing the method’s name.
– Functions are the methods.
![Page 7: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/7.jpg)
constructors
Constructors are used to initialize the variables.
Public class house
{
Public house()
{
String room=null;
}
}
![Page 8: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/8.jpg)
instance
– An instance is a specific realization of any object, The creation of a
realized instance is called instantiation. Each time a program runs, it is
an instance of that program.
– Example:
Computer in an office
![Page 9: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/9.jpg)
polymorphism
– polymorphism refers to the fact that you can have multiple methods with the
same name in the same class.
– Method overloading(Two or more methods or constructors with different signatures)
– Method overriding(Replacing an inherited method with another having the same signature)
![Page 10: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/10.jpg)
inheritance
– Inheritance is the mechanism that allows us to reuse the attributes and methods of one class in
the implementation of another class.
![Page 11: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/11.jpg)
encapsulation
– Encapsulation is a mechanism of wrapping the data (variables) and code acting
on the data (methods) together as a single unit
![Page 12: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/12.jpg)
interfaces
– Using an interface we can tie classes together into a nice package
– It is a collection of abstract methods.
public interface Playable
{
public void play();
}
![Page 13: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/13.jpg)
Some concepts of
software engineering
What are the software models???
![Page 14: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/14.jpg)
Software models
– Waterfall Model.
– V-Shaped Model.
– Evolutionary Prototyping Model.
– Spiral Model
– Iterative and Incremental Method.
– Extreme programming (Agile development)
![Page 15: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/15.jpg)
Waterfall Model
![Page 16: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/16.jpg)
V-Shaped Model
![Page 17: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/17.jpg)
Evolutionary Prototyping Model
![Page 18: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/18.jpg)
Spiral Model
![Page 19: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/19.jpg)
Iterative and Incremental
Method
![Page 20: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/20.jpg)
Extreme programming (Agile
development)
![Page 21: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/21.jpg)
Ooa(Object oriented analysis)
– Investigation of problem and requirements
– Requirements analysis
– OO analysis
![Page 22: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/22.jpg)
Ood(object oriented design)
– Conceptual solution – Less detailed
– NOT implementation
– OO design
– Database design
![Page 23: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/23.jpg)
OO Analysis and Design
– OO- Analysis :
Finding and describing objects or concepts in problem domain
– OO- Design :
Defining objects and their collaboration to fulfill requirements
![Page 24: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/24.jpg)
![Page 25: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/25.jpg)
![Page 26: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/26.jpg)
![Page 27: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/27.jpg)
![Page 28: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/28.jpg)
![Page 29: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/29.jpg)
Basic principles of object
orientation
– 4 building blocksObject Orientation
Ab
stra
ctio
n
Enca
psu
lati
on
Mo
du
lari
ty
hie
rarc
hy
![Page 30: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/30.jpg)
What Is Abstraction?
– The essential characteristics of an entity that distinguish it from all other kinds
of entities
• Defines a boundary relative to the perspective of the viewer
![Page 31: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/31.jpg)
What Is Encapsulation?
– Hide implementation from clients. ƒ
– clients depend on interface
![Page 32: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/32.jpg)
What Is Modularity?
– Modularity is the breaking up of something complex into manageable pieces.
– Modularity helps people to understand complex systems.
![Page 33: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/33.jpg)
![Page 34: OOAD - ShiningStudy€¦ · OOAD Lecture#1 Ms. Hina . Prerequisite OOP. OOP(OBJECT ORIENTED PROGRAMMING) – Oop concepts – Classes – Objects – Methods and constructors –](https://reader030.vdocuments.mx/reader030/viewer/2022040216/5f30e018986d7d11957a557f/html5/thumbnails/34.jpg)
What Is Hierarchy?
– Elements at the same level of the hierarchy should be at the same level of
abstraction.