Mapa mental
Objects and Classes
Contenido del mapa
Objects and Classes
Object-oriented programming (OOP)
Classes
- The blueprint for creating objects; the template - determines what kind of objects you get
- Objects aka Instance
- Have two features that can be performed: attributes and actions. They are optional. (both use camel naming convention)
- Attributes = Fields: variables
- Actions = Methods: define actions that a class's objects can do
- has a declaration part (aka signature of the method. and a body)
- part has a return value, the method name, and a list of arguments
- return type can be a primitive, an object, or void(returns nothing)
- body has code that perform the action
- part has a return value, the method name, and a list of arguments
- has a declaration part (aka signature of the method. and a body)
- an object can contain other objects, that is if the class of the former contains variables that reference to the latter.
- Have two features that can be performed: attributes and actions. They are optional. (both use camel naming convention)
- Objects aka Instance
- fundamental building blocks of a Java program
- Must consider: class name (uses pascal naming convention), fields and methods
- Every class must have at least one constructor. Otherwise, no objects could be created out of the class and the class would be useless
- Constructor looks like a method but doesn't have a return value or void
- The blueprint for creating objects; the template - determines what kind of objects you get
Información
- Descripción
- Mapa Mental sobre Objects and Classes, creado por D'Amour Edwards el 25/05/2020.
- Creado por
- D'Amour Edwards
- Visitas
- 0
- Valoración