SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Object Oriented Software Modeling and Design  CE 350 Abdel-Karim Al-Tamimi, Ph.D. [email_address] http://faculty.yu.edu.jo/altamimi Al-Tamimi 2010 ©
Overview ,[object Object],[object Object],Al-Tamimi 2010 ©
Introduction to OOP ,[object Object],[object Object],Walking, Eating, Sleeping, … Eye-Color, Age, Height, … Attributes Behaviors
OOP Concepts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
OOP vs. Procedural Programming Inputs Outputs object OOP Global Data Procedural Function 1 Function 2 Function 4 Function 3
Moving from Procedural to OOP ,[object Object],[object Object]
Procedural/Structured Programming ,[object Object],[object Object],[object Object],Input Process Output
Structured Programming Students Exams Courses Tutors Add Student Enter for Exams Check Exam Marks Issue Certificate Expel  Student
Structured Programming ,[object Object],[object Object],[object Object]
How to Think in Terms of Objects ,[object Object],[object Object],[object Object]
Object to Object Communications MyObject AnotherObject Data Data MyFunction1 MyFunction2 Function_1 Function_2
Object to Object Communications ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Object to Object Communications
Interface vs. Implementation
Interface vs. Implementation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Interface vs. Implementation Student Age, GPA, … +getAge():integer +admit():void +expel():void +getFullName():string attributes methods
How to determine the minimum interface possible ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Determining the Class’s Environment ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Concept of Scope ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],public class Employee{ … static int Count; … }
Object Attributes vs. Class Attributes
Inheritance ,[object Object],[object Object],[object Object]
Inheritance
Multiple Inheritance ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Polymorphism ,[object Object],[object Object],[object Object],[object Object]
Polymorphism Al-Tamimi 2010 © +ReturnArea():double Shape +ReturnArea():double Circle +ReturnArea():double Square Area  = Length^2 Area  =       Radius^2  Returns a double value
Polymorphism Al-Tamimi 2010 © +GetArea(Shape) MainClass Will call Shape.ReturnArea() Area  = Length^2 Area  =       Radius^2  If shape is Circle If shape is Square
Constructors ,[object Object],[object Object],[object Object],public Student(int StudentNumber) { /* Implementation Code */ }  ... Student BestStudent = new Student(1234); ...
Constructors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Constructors ,[object Object],[object Object],[object Object],[object Object],Student Age, GPA, … +Student: +getAge:integer +admit:void +expel:void +getFullName:string
Error Handling ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Exception Handling ,[object Object],[object Object],try { // potential risky code } catch( Exception object) { // how to solve the exception // can not solve it, throw an exception }
Composition ,[object Object],[object Object]
Resources ,[object Object]

Weitere ähnliche Inhalte

Was ist angesagt?

Darren galpin q4_2008_bristol
Darren galpin q4_2008_bristolDarren galpin q4_2008_bristol
Darren galpin q4_2008_bristolObsidian Software
 
Design Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldDesign Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldSaurabh Moody
 
Lecture-03 Introduction to UML
Lecture-03 Introduction to UMLLecture-03 Introduction to UML
Lecture-03 Introduction to UMLartgreen
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design patternMindfire Solutions
 
EclipseCon 2007: Effective Use of the Eclipse Modeling Framework
EclipseCon 2007: Effective Use of the Eclipse Modeling FrameworkEclipseCon 2007: Effective Use of the Eclipse Modeling Framework
EclipseCon 2007: Effective Use of the Eclipse Modeling FrameworkDave Steinberg
 
Introduction To Uml
Introduction To UmlIntroduction To Uml
Introduction To Umlguest514814
 
Refactoring for Software Design Smells
Refactoring for Software Design SmellsRefactoring for Software Design Smells
Refactoring for Software Design SmellsGanesh Samarthyam
 
GoF Design patterns I: Introduction + Structural Patterns
GoF Design patterns I:   Introduction + Structural PatternsGoF Design patterns I:   Introduction + Structural Patterns
GoF Design patterns I: Introduction + Structural PatternsSameh Deabes
 
Lecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design PatternsLecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design Patternsop205
 
Gof design pattern
Gof design patternGof design pattern
Gof design patternnaveen kumar
 

Was ist angesagt? (18)

Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
 
Darren galpin q4_2008_bristol
Darren galpin q4_2008_bristolDarren galpin q4_2008_bristol
Darren galpin q4_2008_bristol
 
Design Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldDesign Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The World
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
 
Lecture-03 Introduction to UML
Lecture-03 Introduction to UMLLecture-03 Introduction to UML
Lecture-03 Introduction to UML
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
 
EclipseCon 2007: Effective Use of the Eclipse Modeling Framework
EclipseCon 2007: Effective Use of the Eclipse Modeling FrameworkEclipseCon 2007: Effective Use of the Eclipse Modeling Framework
EclipseCon 2007: Effective Use of the Eclipse Modeling Framework
 
Design pattern
Design patternDesign pattern
Design pattern
 
Sda 8
Sda   8Sda   8
Sda 8
 
UML Basics
UML BasicsUML Basics
UML Basics
 
Introduction To Uml
Introduction To UmlIntroduction To Uml
Introduction To Uml
 
UML - An Introduction
UML - An IntroductionUML - An Introduction
UML - An Introduction
 
Refactoring for Software Design Smells
Refactoring for Software Design SmellsRefactoring for Software Design Smells
Refactoring for Software Design Smells
 
GoF Design patterns I: Introduction + Structural Patterns
GoF Design patterns I:   Introduction + Structural PatternsGoF Design patterns I:   Introduction + Structural Patterns
GoF Design patterns I: Introduction + Structural Patterns
 
Lecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design PatternsLecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design Patterns
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Gof design pattern
Gof design patternGof design pattern
Gof design pattern
 

Ähnlich wie Lecture01

C++Day-1 Introduction.ppt
C++Day-1 Introduction.pptC++Day-1 Introduction.ppt
C++Day-1 Introduction.pptcitizen15
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Languagedheva B
 
M.c.a. (sem iv)- java programming
M.c.a. (sem   iv)- java programmingM.c.a. (sem   iv)- java programming
M.c.a. (sem iv)- java programmingPraveen Chowdary
 
Ch.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsCh.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsITNet
 
Oop features java presentationshow
Oop features java presentationshowOop features java presentationshow
Oop features java presentationshowilias ahmed
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaMadishetty Prathibha
 
Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindiappsdevelopment
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .NetGreg Sohl
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introductionsandeep54552
 

Ähnlich wie Lecture01 (20)

Oops
OopsOops
Oops
 
C++Day-1 Introduction.ppt
C++Day-1 Introduction.pptC++Day-1 Introduction.ppt
C++Day-1 Introduction.ppt
 
Advance oops concepts
Advance oops conceptsAdvance oops concepts
Advance oops concepts
 
Principles of oop
Principles of oopPrinciples of oop
Principles of oop
 
MCA NOTES.pdf
MCA NOTES.pdfMCA NOTES.pdf
MCA NOTES.pdf
 
oopusingc.pptx
oopusingc.pptxoopusingc.pptx
oopusingc.pptx
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
 
M.c.a. (sem iv)- java programming
M.c.a. (sem   iv)- java programmingM.c.a. (sem   iv)- java programming
M.c.a. (sem iv)- java programming
 
Ch.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsCh.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objects
 
Oop features java presentationshow
Oop features java presentationshowOop features java presentationshow
Oop features java presentationshow
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
ANDROID FDP PPT
ANDROID FDP PPTANDROID FDP PPT
ANDROID FDP PPT
 
Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1
 
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptxOBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
 
Oops concepts
Oops conceptsOops concepts
Oops concepts
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .Net
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introduction
 
General OOP concept [by-Digvijay]
General OOP concept [by-Digvijay]General OOP concept [by-Digvijay]
General OOP concept [by-Digvijay]
 
chapter - 1.ppt
chapter - 1.pptchapter - 1.ppt
chapter - 1.ppt
 
Seminar
SeminarSeminar
Seminar
 

Mehr von artgreen

Ce350 class project_spring2011_v1.5
Ce350 class project_spring2011_v1.5Ce350 class project_spring2011_v1.5
Ce350 class project_spring2011_v1.5artgreen
 
Lecture10.5
Lecture10.5Lecture10.5
Lecture10.5artgreen
 
Lecture08 examples
Lecture08 examplesLecture08 examples
Lecture08 examplesartgreen
 
Lecture07 examples
Lecture07 examplesLecture07 examples
Lecture07 examplesartgreen
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagramsartgreen
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagramsartgreen
 

Mehr von artgreen (16)

Ce350 class project_spring2011_v1.5
Ce350 class project_spring2011_v1.5Ce350 class project_spring2011_v1.5
Ce350 class project_spring2011_v1.5
 
Lecture11
Lecture11Lecture11
Lecture11
 
Lecture10.5
Lecture10.5Lecture10.5
Lecture10.5
 
Lecture10
Lecture10Lecture10
Lecture10
 
Lecture09
Lecture09Lecture09
Lecture09
 
Lecture09
Lecture09Lecture09
Lecture09
 
Lecture08 examples
Lecture08 examplesLecture08 examples
Lecture08 examples
 
Lecture08
Lecture08Lecture08
Lecture08
 
Lecture07 examples
Lecture07 examplesLecture07 examples
Lecture07 examples
 
Lecture06
Lecture06Lecture06
Lecture06
 
Lecture05
Lecture05Lecture05
Lecture05
 
Lecture05
Lecture05Lecture05
Lecture05
 
Lecture05
Lecture05Lecture05
Lecture05
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagrams
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagrams
 
Lecture02
Lecture02Lecture02
Lecture02
 

Lecture01