[oop - lec 01] introduction to oop

Post on 06-Apr-2017

129 Views

Category:

Education

5 Downloads

Preview:

Click to see full reader

TRANSCRIPT

IntroductionMuhammad Hammad Waseemm.hammad.wasim@gmail.com

Course Objective• The course aims to focus on object-oriented concepts, analysis and

software development.• This course provides in-depth coverage of object-oriented

programming principles and techniques using C++, Understanding and fundamentals (principles) of object oriented programming: encapsulation, polymorphism, and inheritance.• Strong skills in Object Oriented programming will help students to

boost their skills towards software development

Course Outline (1/2)• Introduction to Object Oriented Programming, History, Why Object

Oriented Programming, Programming Paradigms.• Basic Building Blocks of Object Oriented Programming (classes and

objects), Data Members, Member Functions, Accessing class members, Classes and structures.• OOP Key Features (Data Encapsulation and Data Hiding (in detail),

overview of Inheritance and , Polymorphism).• Access Specifiers,• Constructors, (Characteristics, Usage, Syntax), Types of Constructors,

Destructors, Member Functions definition outside the class construct,

Course Outline (2/2)• Scope resolution operator, Returning values and objects from member

functions, Passing objects as arguments,• Static class data (characteristics, usage, syntax),Static Member functions,• Const Members,• Function and Operator Overloading,• Interfaces, Classes and interfaces,• Virtual functions, Inheritance (Characteristics, Usage, Base classes, Derived

classes), Types of Inheritance,• Polymorphism, I/O and file processing,• Exception handling, STL.

Course Material• Main Material Will be Available through Slides and Notes• Reference Books: • Object Oriented Programming in C++, Fourth Edition By RoberLafore,• C How to Program, Sixth Edition Dietal & Dietal

• Recommended for Practice and Understanding• Object Oriented Programming in C++, IT Series

Background knowledge• It is expected that you have experience of writing and understanding

programs with C.• It is also expected that students will have the knowledge of • Functions, • Structures and • Pointers.

How to get the goals• Read and Remember• Read the books, remember the language

• Think• Think in objects, think in classes

• Practice • Do as many coding as possible and make them running

• Ask• Questions

Programming• Programming is like writing, If you can write a demonstration, you can

make a program. • But, actually, programming is not so easy, because a real good

program is not easily programmed. • It needs the programmers’ lots of wisdom, lots of knowledge about

programming and lots of experience.• It is like writing, to be a good writer needs lots of experience and lots

of knowledge about the world.• Learning and practice are necessary.

Computer Programming• Computer Programming is the process of planning a sequence of

steps (called instructions) for a computer to follow.• Programming is a process of problem solving.• Programming life cycle consist of three main phases.• Analyze the problem• Implement the algorithm• Maintenance

Computer Programming• Problem-Solving Phase

• Analysis and Specification: Understand (define) the problem and what the solution must do.

• Understand problem requirements • Does program require user interaction?• Does program manipulate data? • What is the output?• If the problem is complex, divide it into sub problems

• Analyze each sub problem as above• General Solution (Algorithm): Specify the required data types and the logical sequences

of steps that solve the problem.• Verify: Follow the steps exactly to see if the solution really does solve the problem.

Computer Programming• Implementation Phase

• Concrete Solution (Program): Translate the algorithm (the general solution) into a programming language.

• Test: Have the computer follow the instructions. Then manually check the results. If you find errors, analyze the program and the algorithm to determine the source of the errors, and then make corrections.

• Maintenance Phase• Modify the program to meet changing requirements or to correct any errors that show

up while using it.

Object Oriented Programming (OOP)• OOP is a technique in which programs are written on the basis of objects. • An object is collection of data and functions.• The fundamental idea behind object oriented programming is to combine

both data and functions into a single unit. Such a unit is called object.• Object is derived from abstract data type.• Objects of a program interact by sending messages to each other.• Object-oriented programming has a web of interacting objects, each

house-keeping its own state.• OOP is based on real world modeling.

top related