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

Mindmap

Object-oriented Programming (OOP)

Sarah Estes Englisch

Inhalt der Mindmap

Object-oriented Programming (OOP)

  1. Java Object

    • Fields (Attributes)
      • Methods (Actions)
  2. Java Classes

    • Classes create abstractation of problem
      • When writing a class remember:
        • Class name
          • Fields
            • Methods
  3. Fields

    • Are variables - primitives or ref. to objects
      • Object can contain other objects
        • Field names follow camel naming convention
  4. Methods

    • Define actions that a class's objects can do
      • Declaration part + body
      • Return can be primitive, an object, or void
      • Two arguments can be separated by comma
  5. The Method main

    • Main provides entry point to application
      • Main method allows class containing it to be invoked
        • Arguments must pass as strings
  6. Constructors

    • Every class must have one
      • Used to construct object
        • No return value, including a void
    • Constructor can have 0 argument (no-arg)
      • Used to initialize fields in object
    • W/two constructors, you can pass values at same time as creating object
  7. UML Class Diagrams

    • Provides summary of all fields & methods
  8. Creating Objects

    • Can create object using the new keyword
      • Use new followed by constructor of class
    • assign created object to object variable
      • Declare an object reference w/same type as object
    • If you have object, you can call its methods and access its fields
      • Use object reference that was assigned to object
  9. The null Keyword

    • Sometimes reference variable has no value - called null value
    • If declaring local reference variable within method w/no object asssigned:
      • Must assign null
    • Can test for null with == operator

Informationen

Beschreibung
Mindmap am Object-oriented Programming (OOP), erstellt von Sarah Estes am 27/05/2021.
Erstellt von
Sarah Estes
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck