Presentation is loading. Please wait.

Presentation is loading. Please wait.

OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.

Similar presentations


Presentation on theme: "OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives."— Presentation transcript:

1 OOPS CONCEPT

2  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives

3  Top-down structured design: uses algorithmic decomposition where each module denotes a major step in some overall process  Object-oriented design: divides the problem into a set of objects that interacts to solve the problem. Your program’s properties and behaviors are modeled based upon real objects like cars, books, houses, etc. How can one design a program?

4 Difference Between Procedural Vs. Non-Procedural Language?  Procedural Withdraw, deposit, transfer  Object Oriented Customer, money, account

5  It is the problem solving technique to develop the software system.  It’s a technique to think real world in terms of objects  e.g. you, your classmates, your dog, your mobile phone  objects may relate to/interact with each others  e.g. you have a dog, you make a call with your mobile, you talk to your classmates  interaction does something  change of state, side-effect of interaction (e.g. display on screen, file operation), etc. Object-Oriented Programming Concepts

6  Everything is an object.  A program is a bunch of objects telling each other what to do by sending messages.  Each object has its own memory made up of other objects.  Every object has a type.  All objects of a particular type can receive the same messages. OOPS Rules

7  Software is complex (too many people is doing too many things – the mess is inevitable )  One of the main goals in programming is to avoid the redundancy and objects can help to do this (inheritance)  Objects can help increase modularity through data hiding (encapsulation) Why OOP?

8  An object can be written and maintained separately from the rest of the program, modularity.  An object has a “public face” that it uses to communicate with other objects, but other objects can not directly access its instance variables, information hiding. OOPS Benefits

9  OOPS Concepts are mainly 4  Abstraction  Encapsulation  Inheritance  Polymorphisam OOP Features

10  Abstraction:-Hidding non-essential features and showing the essential features (OR)  Hidding unnecessary data from the users details, is called abstraction. Abstraction

11 Abstraction - Example Real Time example: TV Remote Button in that number format and power buttons and other buttons there. just we are seeing the butttons, we don't see the button circuits.i.e buttons circutes and wirings all are hidden.

12  The mechanism that binds together code and data.  It keeps both code and data safe from outside interference and misuse.  The basis of encapsulation is the class.  The process of hiding all the internal details of an object from the outside world.  Writing Operations and methods stored in a single class. This is Called Encapsulation Encapsulation

13 Encapsulation - Examples Real Time Example: Medical Capsuals i.e one drug is stored in bottom layer and another drug is stored in Upper layer these two layers are combined in single capsual.

14  Inheritance is the process of deriving a new class from an existing one.  The existing class is called the parent class or super class.  The derived class is called the child class or subclass.  Java supports single and multi-level inheritance.  Multiple inheritance is done by Interface. Inheritance

15 Inheritance - Examples

16  It refers to the ability of two or more objects belonging to different classes to respond exactly to the same message.  It is defined as, one interface multiple methods.  Interface and overloading are examples of Polymorphism.  Two Types of Polymorphism:  Compile- time Polymorphism. (Overloading)  Run-time Polymorphism. (Overriding) Polymorphisam

17 Polymorphisam - Examples OFFICE HOME RAILWAY STATION

18  It happens within the class  Same Method name with different arguments  It is compile time polymorphism  Overriding – It happens during inheritance via classes and interface  Same method and with same signature  Sub class method with the same signature and return type of that of parent class.  It is Run time polymorphism Overloading And Overriding

19  It is a conceptual idea of an object or real-world entity.  A class describes all the attributes of objects.  It is a blue-print of an object.  It is a collection of objects which have common state and behavior. Class

20  A (software) object bundles together data(state) and functions(behavior) of an object(physical or conceptual).  It defines something material that may be perceived by the senses.  Something mental or physical towards which thought, feeling or action is directed.  It is an instance of a class.  It is physical reality of the program. Object

21 Class and Object Classes reflect concepts, objects reflect instances that embody those concepts. B C D A girl class object

22 Mapping the world to software 011101 10011 11101 0110100 11010 010101 1110101 10101 Objects in the problem domain are mapped to objects in software


Download ppt "OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives."

Similar presentations


Ads by Google