Heim » Abstraction (OOP programming)

Abstraction (OOP programming)

1970
  • Barbara Liskov

Abstraction in OOP is the concept of hiding complex implementation details and showing only the essential features of the object. It focuses on what an object does instead of how it does it. This is achieved through abstract classes and interfaces, which define a blueprint for other classes without providing a complete implementation, simplifying complex systems.

Abstraction is a process of managing complexity. In programming, it involves creating a simplified representation of a system or component. In OOP, this is primarily done using abstract classes and interfaces. An abstract class is a class that cannot be instantiated on its own and is meant to be subclassed. It can contain abstract methods (methods without a body) that subclasses must implement. An interface is a similar concept but is purely abstract; it can only define Verfahren signatures, not implementations. A class can then ‘implement’ an interface, promising to provide the functionality defined in it.

This allows programmers to define a common contract or API that multiple different classes can adhere to. For example, an interface ‘Storable’ could define ‘save()’ and ‘load()’ methods. Different classes like ‘Document’, ‘Image’, and ‘UserSettings’ could all implement the ‘Storable’ interface, each providing its own logic for saving and loading. Code that works with ‘Storable’ objects doesn’t need to know the specific type of object it’s dealing with; it only needs to know that it can call ‘save()’ and ‘load()’. This decouples the client code from the specific implementations, making the system more modular, flexible, and easier to understand at a high level.

UNESCO Nomenclature: 1203
- Computerwissenschaften

Typ

Abstraktes System

Unterbrechung

Grundlegendes

Verwendung

Weit verbreitete Verwendung

Vorläufersubstanzen

  • mathematical abstraction
  • the concept of subroutines and functions as a form of procedural abstraction
  • abstract data types (adt) theory
  • the need to manage complexity in large-scale engineering projects

Anwendungen

  • database access layers (DALs) that hide the specific SQL queries
  • device drivers abstracting hardware complexity from the operating system
  • graphical user interface (GUI) libraries providing high-level widgets
  • network protocols like HTTP abstracting the underlying TCP/IP communication
  • the standard template library (stl) in C++

Patente:

NA

Mögliche Innovationsideen

!Professionals (100% free) Mitgliedschaft erforderlich

Sie müssen ein Professionals (100% free) Mitglied sein, um auf diesen Inhalt zugreifen zu können.

Jetzt teilnehmen

Sie sind bereits Mitglied? Hier einloggen
Related to: abstraction, interface, abstract class, API, information hiding, complexity, OOP, contract, decoupling, modularity.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

VERFÜGBAR FÜR NEUE HERAUSFORDERUNGEN
Maschinenbauingenieur, Projekt-, Verfahrenstechnik- oder F&E-Manager
Effektive Produktentwicklung

Kurzfristig für eine neue Herausforderung verfügbar.
Kontaktieren Sie mich auf LinkedIn
Integration von Kunststoff-Metall-Elektronik, Design-to-Cost, GMP, Ergonomie, Geräte und Verbrauchsmaterialien in mittleren bis hohen Stückzahlen, Lean Manufacturing, regulierte Branchen, CE und FDA, CAD, Solidworks, Lean Sigma Black Belt, medizinische ISO 13485

Wir suchen einen neuen Sponsor

 

Ihr Unternehmen oder Ihre Institution beschäftigt sich mit Technik, Wissenschaft oder Forschung?
> Senden Sie uns eine Nachricht <

Erhalten Sie alle neuen Artikel
Kostenlos, kein Spam, E-Mail wird nicht verteilt oder weiterverkauft

oder Sie können eine kostenlose Vollmitgliedschaft erwerben, um auf alle eingeschränkten Inhalte zuzugreifen >Hier<

Verwandte Erfindungen, Innovationen und technische Prinzipien

Nach oben scrollen

Das gefällt dir vielleicht auch