Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object-Oriented Programming (OOP) Lecture No. 1. Course Objective ► Objective of this course is to make students familiar with the concepts of object-oriented.

Similar presentations


Presentation on theme: "Object-Oriented Programming (OOP) Lecture No. 1. Course Objective ► Objective of this course is to make students familiar with the concepts of object-oriented."— Presentation transcript:

1 Object-Oriented Programming (OOP) Lecture No. 1

2 Course Objective ► Objective of this course is to make students familiar with the concepts of object-oriented programming ► Concepts will be reinforced by their implementation in C++

3 Course Contents ► Object-Orientation ► Objects and Classes ► Overloading ► Inheritance ► Polymorphism ► Generic Programming ► Exception Handling ► Introduction to Design Patterns

4 Books ► C++ How to Program By Deitel & Deitel ► The C++ Programming Language By Bjarne Stroustrup ► Object-Oriented Software Engineering By Jacobson, Christerson, Jonsson, Overgaard

5 Grading Policy ► Assignments15 % ► Group Discussion 5 % ► Mid-Term35 % ► Final45 %

6 Object-Orientation (OO)

7 What is Object-Orientation? ► A technique for system modeling ► OO model consists of several interacting objects

8 What is a Model? ► A model is an abstraction of something ► Purpose is to understand the product before developing it

9 Examples – Model ► Highway maps ► Architectural models ► Mechanical models

10 Example – OO Model

11 …Example – OO Model ► Objects  Ali  House  Car  Tree ► Interactions  Ali lives in the house  Ali drives the car Ali Car House Tree lives-in drives

12 Object-Orientation - Advantages ► People think in terms of objects ► OO models map to reality ► Therefore, OO models are  easy to develop  easy to understand

13 What is an Object? An object is ► Something tangible (Ali, Car) ► Something that can be apprehended intellectually (Time, Date)

14 … What is an Object? An object has ► State (attributes) ► Well-defined behaviour (operations) ► Unique identity

15 Example – Ali is a Tangible Object ► State (attributes)  Name  Age ► behaviour (operations)  Walks  Eats ► Identity  His name

16 Example – Car is a Tangible Object ► State (attributes) - Color - Model ► behaviour (operations) - Accelerate- Start Car - Change Gear ► Identity - Its registration number

17 Example – Time is an Object Apprehended Intellectually ► State (attributes) - Hours- Seconds - Minutes ► behaviour (operations) - Set Hours- Set Seconds - Set Minutes ► Identity - Would have a unique ID in the model

18 Example – Date is an Object Apprehended Intellectually ► State (attributes) -Year- Day -Month ► behaviour (operations) - Set Year- Set Day - Set Month ► Identity - Would have a unique ID in the model


Download ppt "Object-Oriented Programming (OOP) Lecture No. 1. Course Objective ► Objective of this course is to make students familiar with the concepts of object-oriented."

Similar presentations


Ads by Google