1 / 10

OBJECT ORIENTED PROGRAMMING

OBJECT ORIENTED PROGRAMMING. OOP CONCEPTS. OBJECT CLASS ABSTRACTION ENCAPSULATION INHERITANCE POLYMORPHISM MODULARITY. OBJECT. “OBJECT IS AN IDENTIFIABLE ENTITY WITH SOME CHARACTERISTICS AND BEHAVIOURS.”

nigel
Download Presentation

OBJECT ORIENTED PROGRAMMING

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OBJECT ORIENTED PROGRAMMING

  2. OOP CONCEPTS • OBJECT • CLASS • ABSTRACTION • ENCAPSULATION • INHERITANCE • POLYMORPHISM • MODULARITY

  3. OBJECT “OBJECT IS AN IDENTIFIABLE ENTITY WITH SOME CHARACTERISTICS AND BEHAVIOURS.” EXAMPLE : DOG(ANIMAL), ORANGE(FRUIT), MARUTI 800(CAR), ETC.

  4. CLASS “A CLASS IS A BLUPRINT/TEMPLATE FOR AN OBJECT OR GROUP OF OBJECTS THAT SHARE COMMON PROPERTIES AND RELATIONSHIPS OR WAY TO BIND THE DATA MEMBERS AND ASSOCIATED MEMBER FUNCTIONS IN A SINGLE UNIT.” EXAMPLE: ANIMAL(DOG, CAT, ELEPHANT), FRUIT(ORANGE, APPLE) CAR(MARUTI 800, BMW, FERRARI) CLASS IS VIRTUAL CONCEPT, WHILE OBJECT IS REAL ENTITY.

  5. ABSTRACTION “ABSTRACTION REFERS TO THE ACT OF REPRESENTING ESSENTIAL FEATURES WITHOUT INCLUDING THE BACKGROUND DETAILS OR EXPLANATIONS.” EXAMPLE: A MARUTI 800 HAS ACCELERATING SYSTEM AND BREAKING SYSTEM; WE KNOW THE WORKING OF ACCELERATING SYSTEM AND BREAKING SYSTEM BUT WE DO NOT KNOW WHAT IS THE MEACHNISHM INSIDE IT. LIKE THAT A FUNCTION “ DISPLAY( )” ASSOCIATED WITH ANY OBJECT DISPLAYS THE INFORMATION ABOUT OBJECT BUT WE DON’T KNOW WHICH STATEMENTS WRITTEN IN THE DEFINITION FOR DISPLAYING SUCH INFORMATION.

  6. ENCAPSULATION “THE WRAPPING UP OF DATA AND OPERATIONS / FUNCTIONS INTO A SINGLE UNIT IS KNOWN AS ENCAPSULATION. EXAMPLE: LIKE A MEDICENAL CAPSULE, MIXTURE OF DIFFERENT CHEMICALS WRAPPED INTO A SINGLE UNIT. EXAMPLE: CLASS IS ACTUAL EXAMPLE, IN WHICH DATA MEMBERS AND MEMBER FUNCTIONS WRAP INTO A SINGLE UNIT.

  7. INHERITANCE “INHERITANCE IS THE CAPABILITY OF ONE CLASS OF THINGS TO INHERIT CAPABILITIES OR PROPERTIES FROM ANOTHER CLASS.” INHERITANCE GIVES THE CONCEPTS OF REUSABILITY AND TRANSITIVITY. HERE SUB-CLASS CAR AND SUB-CLASS BUS ARE INHERITING THE CAPABILITIES LIKE – WHEELS, SEATS, HEADLIGHTS, BREAKING SYSTEM, ACCELERATING SYSTEM, ETC. OF CLASS AUTOMOBILES. AUTOMOBILES CAR BUS

  8. POLYMORPHISM “POLYMORPHISM IS THE ABILITY OF A MESSAGE OR DATA TO BE PROCESSED IN MORE THAN ONE FORM.” EXAMPLE: HERE AREA( ) IS A MESSAGE OR FUNCTION THAT CAN BE PROCESSED IN THREE DIFFERENT WAYS , EACH CALCULATES THE AREA ACCORDING TO ARGUMENT S PASSED IN ITS LIST. SHAPE AREA( ) CIRCLE TRIANGLE RECTANGLE AREA( ) AREA( ) AREA( )

  9. MODULARITY “MODULARITY IS A PROPERTY OF A SYSTEM THAT HAS BEEN DECOMPOSED INTO A SET OF COHESHIVE AND LOOSELY COUPLED MODULES.” OR “THE ACT OF PARTITIONING A PROGRAM INTO INDIVIDUAL COMPONENTS IS CALLED MODULARITY.” IN OOP, WE CAN DIVIDE OUR PROGRAM IN SEVERAL CLASSES & EACH CLASS IS SAID TO BE A MODULE.

  10. THANKS

More Related