01 introduction to oop

13
INTRODUCTION TO OOP Object Oriented Programming

Upload: danita-ureta-balasta

Post on 30-Sep-2015

237 views

Category:

Documents


2 download

DESCRIPTION

Object Oriented Programming

TRANSCRIPT

  • INTRODUCTION TO OOP Object Oriented Programming

    Advanced Object-Oriented Concepts (Part 1)

  • Programming ParadigmProcedural Programmingstyle of programming in which the programming task is broken down into a series of operations (called procedures) applied to data (or data structures) C and Pascal

    *Introduction to OOP

    Advanced Object-Oriented Concepts (Part 1)

  • Programming ParadigmObject Oriented Programmingextension of procedural programming breaks down a programming task into a series of interactions among different entities or objectsJava, C++, and Smalltalk

    *Advanced Object-Oriented Concepts (Part 1)

    Advanced Object-Oriented Concepts (Part 1)

  • Object Oriented Programmingtype of programming in which programmers define not only the data structures, but also the types of operations (methods) that can be applied to the data structure enables programmers to create modules that do not need to be changed when a new type of object is added most widely used paradigminstead of focusing on what the system has to do, focus on:what objects the system containshow they interact towards solving the programming problem

    *Introduction to OOP

    Advanced Object-Oriented Concepts (Part 1)

  • Object Oriented ProgrammingAdvantages of OOP over conventional approaches:It provides a clear modular structure for programs which makes it good for defining abstract data types where implementation details are hidden and the unit has a clearly defined interface.It makes it easy to maintain and modify existing code as new objects can be created with small differences from existing ones.It provides a good framework for code libraries where supplied software components can be easily adapted and modified by the programmer.

    *Introduction to OOP

    Advanced Object-Oriented Concepts (Part 1)

  • Object Oriented ProgrammingKey OOP concepts:Objects ClassesAbstraction InheritanceEncapsulationPolymorphism

    *Introduction to OOP

    Advanced Object-Oriented Concepts (Part 1)

  • Objects and ClassesObjectsrepresent things from the real worldmade up of attributes characteristics that define an objectmethods self-contained block of program code similar to procedure

    *Introduction to OOP

    Advanced Object-Oriented Concepts (Part 1)

  • Objects and ClassesClassesterm that describes a group or collection of objects with common properties define a type of object specifies methods and data that type of object has

    *Introduction to OOP

    Advanced Object-Oriented Concepts (Part 1)

  • Abstractionallows a programmer to hide all but the relevant information (to the problem at hand) about an object in order to reduce complexity and increase efficiencyclosely related to encapsulation and information hiding

    *Introduction to OOP

    Advanced Object-Oriented Concepts (Part 1)

  • Encapsulationrefers to the hiding of data (attributes) and methods within an objectprotects an objects data from corruptionprotects the objects data from arbitrary and unintended use hides the details of an objects internal implementation from the users of an object separates how an object behaves from how it is implemented

    *Introduction to OOP

    Advanced Object-Oriented Concepts (Part 1)

  • Inheritancethe process by which objects can acquire (inherit) the properties of objects of other class provides reusability, like adding additional features to an existing class without modifying it Use of extends keyword

    *Introduction to OOP

    Advanced Object-Oriented Concepts (Part 1)

  • Polymorphismrefers to the ability to process objects differently depending on their data type or class the ability to redefine methods for derived classes

    *Introduction to OOP

    Advanced Object-Oriented Concepts (Part 1)

  • Abstract Classesclass that is not used to create (instantiate) objects designed to act as a base class (to be inherited by other classes)

    *Introduction to OOP

    Advanced Object-Oriented Concepts (Part 1)

    *