Mapa mental
Object-Oriented Programming
Contenido del mapa
Object-Oriented Programming
Objects
- Two features: attributes (fields) and actions it can perform (methods)
- An object could have one, none, or both of these
- Two features: attributes (fields) and actions it can perform (methods)
Models Applications on Real World Objects
Classes
- Objects
- An object can contain another object
- "new" keyword creates new objects
- A reference variable without an object must be assigned null
- Template to create objects of that type
- Tool to create abstractions of a problem
- Consider the class name, fields, and methods when writing a class
- Fields
- Variable. Either primitive or reference to an object
- Methods
- Define actions that a class's objects can do
- Has a declaration part and a body
- Declaration consists of name, return type, list of arguments
- Body contains code
- Can return a primitive, object, or void
- Void means it return nothing
- The main method
- Provides the entry point to a appliction
- Constructors
- Every class must have a constructor to construct its objects
- Looks like a method, but returns nothing
- Fields
- Objects
Información
- Descripción
- Mapa Mental sobre Object-Oriented Programming, creado por Jeff Golub el 28/08/2019.
- Creado por
- Jeff Golub
- Visitas
- 0
- Valoración