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

Mindmap

OOP - Objects and Classes

Hadley Browder Englisch

Inhalt der Mindmap

OOP - Objects and Classes

  1. Java Objects

    • have attributes
      • known as fields - fields are optional
    • can perform actions
      • known as methods - methods are optional
    • also called an instance
  2. Class

    • a blueprint or template to create objects of a similar type
    • class name
      • capitalize the initial of each word - Pascal naming convention
    • fields
      • variables
        • primitives
        • references to other objects
      • follow the camel naming convention
        • first initial of each word, except the first, is capitalized
    • methods
      • define actions that a class's objects can do
      • declaration
        • return value
          • void
            • the method returns nothing
          • object
          • primitive
        • method name
        • list of arguments
      • body
        • contains code to perform an action
      • the special method main provides the entry point to an application
    • represented by a rectangle in UML class diagrams
    • constructors
      • used to construct an object
      • is sometimes called a constructor method
      • has no return
      • may have zero argument
    • creating an object from a class
      • "construct" or "instantiate"
      • new keyword following by the constructor of the class
      • can assign a created object to an object variable (or reference variable)
        • can call an object's methods and fields by using the object reference
        • null = when a reference variable does not have a value
  3. UML Class Diagrams

    • provides a quick summary of fields and methods
      • can include field types and method signatures

Informationen

Beschreibung
Mindmap am OOP - Objects and Classes, erstellt von Hadley Browder am 29/08/2019.
Erstellt von
Hadley Browder
Aufrufe
1
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck