¡GoConqr estrena diseño! Cuéntanos qué te parece.

Mapa mental

Ch 4: Objects & Classes

Samantha Sullivan COP2800 Inglés

Contenido del mapa

Ch 4: Objects & Classes

  1. OOP: Creating a model that resembles real-life situation

  2. OBJECT

    • FIELDS
      • Variables; can be primitives or references to objects
    • METHODS
      • Define actions that a class's object can do
      • DECLARATION
        • Consists of return value, method name, & a list of arguments
          • Return type can be:
            • Primitive
            • An object
            • Void
              • Method returns nothing
              • Null
                • Nothing
      • BODY
        • Contains code that perform action
          • Types of Actions
            • Create
            • Read
            • Update
            • Delete
      • The Method Main
        • Provides the entry point to an application - only one of the classes needs to have one
    • An element that corresponds to the properties of a specific class
    • DATA TYPES
      • Primitive/SImple
        • Boolean
          • T/F
        • Int
          • ..-1000..0..1000...
        • Double
          • 3.14159265
        • Char
          • 'a' 'b' 'c'
      • Composite/Complex
        • String
          • Words & Sentences
  3. CLASS

    • Blueprint/Template to create objects of identical type - all program elements reside in a class
    • When writing a class, consider:
      • Class Name
      • Fields
      • Methods
    • CONSTRUCTOR
      • Used to construct an object - looks like a method, however does not have a return value
        • Every class needs at least 1
    • General scenario - represents an element from problem's world/context

Información

Descripción
COP2800 Mapa Mental sobre Ch 4: Objects & Classes, creado por Samantha Sullivan el 27/08/2019.
Visitas
4
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?