Your SlideShare is downloading. ×
Oop +  lecture01
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Oop + lecture01


Published on



Published in: Education, Technology

1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Object-Oriented ProgrammingObject-Oriented Programming (OOP)(OOP) Lecture No. 1Lecture No. 1
  • 2. Course ObjectiveCourse Objective ►Objective of this course is to make studentsObjective of this course is to make students familiar with the concepts of object-orientedfamiliar with the concepts of object-oriented programmingprogramming ►Concepts will be reinforced by theirConcepts will be reinforced by their implementation in C++implementation in C++
  • 3. Course ContentsCourse Contents ►Object-OrientationObject-Orientation ►Objects and ClassesObjects and Classes ►OverloadingOverloading ►InheritanceInheritance ►PolymorphismPolymorphism ►Generic ProgrammingGeneric Programming ►Exception HandlingException Handling ►Introduction to Design PatternsIntroduction to Design Patterns
  • 4. BooksBooks ►C++ How to ProgramC++ How to Program By Deitel & DeitelBy Deitel & Deitel ►The C++ Programming LanguageThe C++ Programming Language By Bjarne StroustrupBy Bjarne Stroustrup ►Object-Oriented Software EngineeringObject-Oriented Software Engineering By Jacobson, Christerson, Jonsson, OvergaardBy Jacobson, Christerson, Jonsson, Overgaard
  • 5. Grading PolicyGrading Policy ►AssignmentsAssignments 10 %10 % ►ProjectProject 10 %10 % ►Quiz & HW 10 %Quiz & HW 10 % ► Mid-TermMid-Term 30 %30 % ►FinalFinal 40 %40 %
  • 6. Object-Orientation (OO)Object-Orientation (OO)
  • 7. What is Object-Orientation?What is Object-Orientation? ►A technique for system modelingA technique for system modeling ►OO model consists of several interactingOO model consists of several interacting objectsobjects
  • 8. What is a Model?What is a Model? ►A model is an abstraction of somethingA model is an abstraction of something ►Purpose is to understand the product beforePurpose is to understand the product before developing itdeveloping it
  • 9. Examples – ModelExamples – Model ►Highway mapsHighway maps ►Architectural modelsArchitectural models ►Mechanical modelsMechanical models
  • 10. Example – OO ModelExample – OO Model
  • 11. ……Example – OO ModelExample – OO Model ►ObjectsObjects  AliAli  HouseHouse  CarCar  TreeTree ►InteractionsInteractions  Ali lives in the houseAli lives in the house  Ali drives the carAli drives the car Ali Car House Tree lives-in drives
  • 12. Object-Orientation - AdvantagesObject-Orientation - Advantages ►People think in terms of objectsPeople think in terms of objects ►OO models map to realityOO models map to reality ►Therefore, OO models areTherefore, OO models are  easy to developeasy to develop  easy to understandeasy to understand
  • 13. What is an Object?What is an Object? An object isAn object is ►Something tangible (Ali, Car)Something tangible (Ali, Car) ►Something that can be apprehendedSomething that can be apprehended intellectually (Time, Date)intellectually (Time, Date)
  • 14. …… What is an Object?What is an Object? An object hasAn object has ►State (attributes)State (attributes) ►Well-defined behaviour (operations)Well-defined behaviour (operations) ►Unique identityUnique identity
  • 15. Example – Ali is a Tangible ObjectExample – Ali is a Tangible Object ►State (attributes)State (attributes)  NameName  AgeAge ►behaviour (operations)behaviour (operations)  WalksWalks  EatsEats ►IdentityIdentity  His nameHis name
  • 16. Example – Car is a Tangible ObjectExample – Car is a Tangible Object ►State (attributes)State (attributes) - Color- Color - Model- Model ►behaviour (operations)behaviour (operations) - Accelerate- Accelerate - Start Car- Start Car - Change Gear- Change Gear ►IdentityIdentity - Its registration number- Its registration number
  • 17. Example – Time is an ObjectExample – Time is an Object Apprehended IntellectuallyApprehended Intellectually ►State (attributes)State (attributes) - Hours- Hours - Seconds- Seconds - Minutes- Minutes ►behaviour (operations)behaviour (operations) - Set Hours- Set Hours - Set Seconds- Set Seconds - Set Minutes- Set Minutes ►IdentityIdentity - Would have a unique ID in the model- Would have a unique ID in the model
  • 18. Example – Date is an ObjectExample – Date is an Object Apprehended IntellectuallyApprehended Intellectually ►State (attributes)State (attributes) - YearYear - Day- Day - MonthMonth ►behaviour (operations)behaviour (operations) - Set Year- Set Year - Set Day- Set Day - Set Month- Set Month ►IdentityIdentity - Would have a unique ID in the model- Would have a unique ID in the model