Klasse (EN)

Concept

Fundamental building block of object-oriented models that encapsulates data and functionality

Architecture

classDiagram   class Klasse {     +attribut1: Typ     +attribut2: Typ     +methode1(): Rückgabetyp     +methode2(param: Typ): Rückgabetyp   }   Klasse <|-- Unterklasse   Klasse "1" *-- "0..*" Objekt 

In Context

  • Typically used together with objects, inheritance, and encapsulation
  • Related to: Object, Instance, Inheritance, Abstract Class, Interface
  • Example usage: In a banking application, a "Account" class could contain attributes like "accountNumber" and "balance" as well as methods like "deposit()" and "withdraw()"
Quelle: AI Generated