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

Mindmap

OOP: object-oriented programming

Xinyi Ge Englisch

Inhalt der Mindmap

OOP: object-oriented programming

  1. objects

    • living eg: people
    • concrete eg: book
  2. object

    • living eg: people
    • concrete eg: book
    • abstract eg: idea
  3. class--serve as template in programming, to create identical type of objects

    • using Pascal naming convention
    • class definition, use the same name as class
      • eg: Employee.java for class Employee
  4. field (attributes for objects), using Pascal naming convention, Capitalize the initials

    • variables : primitives/references to objects
  5. method (actions for objects) , using camel naming convention, capitalize all initials except the first word

    • actions objects do
    • declaration of methods is called signature of methods
    • method main
      • entry to an application
      • arguments written as string
  6. return type: primitive/ object/ void (nothing to return)

  7. UML diagram

    • class name on the top, lists of fields in the middle and methods in the bottom
    • have to have a comma between field and type , arguments as a string , return type is written after colon
  8. constructor

    • each class has to have a constructor
      • have to use the same name as class
    • no-argument constructor
      • constructor has no argument
  9. the null keyword

    • not referencing any object
      • "null" will be assigned when declaring a local reference variable within a method but do not sign object to it
      • the "==" operator for testing if a reference variable is null
  10. create objects

    • objects also refer to instance
    • instantiate
      • use "new" keyword, declare object reference with the same type as object, assign values

Informationen

Beschreibung
Mindmap am OOP: object-oriented programming, erstellt von Xinyi Ge am 12/09/2020.
Erstellt von
Xinyi Ge · Sep 2020
Aktualisiert
12 Sep 2020
Aufrufe
1
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck