Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

1669609053088_oops_final.pptx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Chargement dans…3
×

Consultez-les par la suite

1 sur 19 Publicité
Publicité

Plus De Contenu Connexe

Plus récents (20)

Publicité

1669609053088_oops_final.pptx

  1. 1. OBJECT ORIENTATED PROGRAMMING PRESENTATION DONE BY: PANDEESWARI.K(19IT1036)
  2. 2. 1 2 4 INTRODUCTION TO OOPS HIERACHY OF PROGRAMMING PARADIGMS PROCEDURAL LANGUAGE VS OBJECT-ORIENTATED LANGUAGE NEED OF OOPS 01 02 03 07 8CCCCCCCCCCCCCCC COMPONENTS OF OOPS 3 6 5 OOPS LANGUAGES 7 BENEFITS OF OOPS 8 CONCLUSION
  3. 3. INTRODUCTION TO OOPS • The object-oriented paradigm is a programming methodology that promotes the efficient design and development of software system using reusable components • It can be quickly and safely assembled into larger systems. • The main aim of object-oriented programming is to implement real world concepts like Object -> real world entity Classes ->Templates/ Blueprints Abstraction -> Visibility Controls Inheritance -> Backward Compapatibilty ->parent child relation Polymorphism ->Many forms
  4. 4. HIERARCHY OF PROGRAMMING PARADIGMS
  5. 5. PROCEDURAL VS OOPS
  6. 6. NEED OF OOPS • It breaks down requirements into objects with responsibilities, not into functional steps. • Easier to Model Real things • To make software projects more manageable and predictable • For more re-use code and prevent ‘reinvention of wheel’ every time
  7. 7. COMPONENTS OF OOPS
  8. 8. CLASSES AND OBJECTS  A class is a group of objects which have common properties.  It is a template or blueprint from which objects are created.  It is a logical entity.  It is non primitive data type.  It can't be physical(no memory space)  Object is an Instance of a class  Any entity that has state and behavior is known as an object.  For example a chair, pen, table, keyboard, bike, etc.  A object can be physical or logical .
  9. 9. Programming Representation Of a Class and Object //Defining a Student class. class Student{ //defining fields int id; //field or data member or instance variable String name; //creating main method inside the Student class public static void main(String args[]){ //Creating an object or instance Student s1=new Student();//creating an object of Student //Printing values of the object System.out.println(s1.id);//accessing member through reference variable System.out.println(s1.name); } }
  10. 10. INHERITANCE  Inheritance is a mechanism in which one object acquires all the properties and behaviors of a parent object.  Inheritance represents the IS-A relationship which is also known as a parent-child relationship.  EXAMPLES:Animal is a Mammals , Reptiles or Birds.  Sub Class/Child Class/drived/extended -> inherits from other class  Super Class/Parent Class/ Base class ->Superclass is the class from where a subclass inherits features.  Types Of inheritance: -Single -> Class B -> Class A - Multilevel -> Class C -> Class B -> Class A - Hierarchical -> Class B -> Class A, Class C -> Class A - Multiple -> Class C -> class A, Class C -> class B
  11. 11. Programming Representation of Inheritance Programming Representation of Inheritance The syntax of Java Inheritance class Subclass-name extends Superclass-name { //methods and fields } Example: class Employee{ float salary=40000; } class Programmer extends Employee{ int bonus=10000; public static void main(String args[]){ Programmer p=new Programmer(); System.out.println("Programmer salary is:"+p.salary); System.out.println("Bonus of Programmer is:"+p.bonus); }
  12. 12. Polymorphism  If one task is performed by different ways, it is known as polymorphism.  For example: To convince the customer differently, to draw something, like shape, triangle, rectangle , a cat speaks meow, dog barks woof, etc.  Polymorphism present a method that can have many definitions.  Polymorphism is related to - Overloading -> Compile timepolymorphism/runtimepolymorphism - Overriding -> Run time polymorphism/ Dynamic polymorphism - Syntax getPrice() getPrice(string name)
  13. 13. Encapsulation  Encapsulation is the integration of data and operations into a class.  Encapsulation is hiding the functional details from the object calling it. Examples: A capsule So, how does acceleration work? Huh? Details encapsulated (hidden) from the driver.
  14. 14. Abstraction  Abstraction is basically hiding the implementation and gain access to there functionality by exposing by extend keyword.  An abstract class is a class that may not have any direct instances.  An abstract operation is an operation that it is incomplete and requires a child to supply an implementation of the operation.
  15. 15. ACCESS MODIFIERS
  16. 16. BENEFITS OF OOPS
  17. 17. CONCLUSION  Thus using oops,we can develop the programs from standard working modules that communicate with one another, rather than having to start writing the code from abrasion which leads to saving of development time and advanced productivity.  OOPs allow to break the program into bit-sized problems that can be answered fluently (one object at a time).  The new technology promises higher programmer productivity, a better quality of software, and lower conservation cost.  The benefits of OOPs systems can be fluently upgraded from small to large systems.  It’s possible that multiple cases of objects co-occur without any embarrassment.  It’s actually easy to partition the work into a design grounded on objects.
  18. 18. REFERENCES  IEEE Standard Glossary of Software Engineering Terminology, ANSI/IEEE Std 729-1983, The Institute of Electrical and Electronics Engineers, Inc., 1983.  Sametinger J. and Stritzinger A. A Documentation Scheme for Object-Oriented Software Systems. OOPS Messenger, 1993.  Stroustrup B.: The C++ Programming Language (Second Edition), Addison-Wesley, 1991.  Weinand A., Gamma E., Marty R.: Design and Implementation of ET++, a Seamless Object-Oriented Application Framework, Structured Programming,Vol. 10, No.2, 1989.  https://developer.mozilla.org/en- US/docs/Learn/JavaScript/Objects/Object- oriented_programming.  http://sepwww.stanford.edu/public/docs/sep67/jon2/pap er_html/node4.html
  19. 19. THANK YOU!

×