GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Polymorphism

Eloy Marcos Domínguez Spanisch 4 Karten

Karten in diesem Stapel (4)

  1. 1Polymorphism In object oriented programming, polymorphism is a powerful and fundamental tool. It can be used to create a more organic flow in your application. This tutorial will describe the general concept of polymorphism, and how it can easily be deployed in PHP.What is Polymorphism?
    Polymorphism is a long word for a very simple concept.
    Polymorphism describes a pattern in object oriented programming in which classes have different functionality while sharing a common interface.
    The beauty of polymorphism is that the code working with the different classes does not need to know which class it is using since they're all used the same way.
  2. 2polymorphism is used to make applications more modular and extensible. Instead of messy conditional statements describing different courses of action, you create interchangeable objects that you select based on your needs.Interfaces and abstract classes
    An integral part of polymorphism is the common interface. There are two ways to define an interface in PHP: interfaces and abstract classes. Both have their uses, and you can mix and match them as you see fit in your class hierarchy.
  3. 3An interface is similar to a class except that it cannot contain code. An interface can define method names and arguments, but not the contents of the methods. Any classes implementing an interface must implement all methods defined by the interface. A class can implement multiple interfaces.abstract class
    An abstract class is a mix between an interface and a class. It can define functionality as well as interface (in the form of abstract methods). Classes extending an abstract class must implement all of the abstract methods defined in the abstract class.
  4. 4Steps Step 1: Identify The Problem Step 2: Define Your Interface Step 3: Create Your Implementation Step 4: Use Your Implementation Step 5: Put It All TogetherConclusion
    Polymorphism is an elegant way to escape from ugly conditional statements in your OOP code. It follows the principle of keeping your components separate, and is an integral part of many design patterns

Informationen

Beschreibung
md
Erstellt von
Eloy Marcos Domínguez · Aug 2017
Aktualisiert
17 Aug 2017
Aufrufe
8
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck