Mapa mental
Object Oriented Programming
Conteúdo do mapa
Object Oriented Programming
- Works by modeling applications on real-world objects. Uses classes and objects and can be organized with UML Class Diagrams.
Class
- A class is a blueprint that helps create objects of similar types. All program elements in Java must be under a class.
- Constructor
- A constructor is used to construct an object. Every class must have at least one constructor. A constructor looks like a method, but does not have a return value. A constructor may have zero argument, in which case it is called a noargument constructor. Constructor arguments can be used to initialize the fields in the object.
Object
- Objects have two features: attributes and actions that they are able to perform. Attributes are called fields and actions are called methods. Both fields and methods are optional; an object may have one, both, or neither. To create objects, you need classes.
- Fields
- Variables; can be primitives or references to other objects. The initial of each word in a field is capitalized, except for the first word (e.g. newAddress)
- Methods
- Methods define the actions that an object can perform. A method has a declaration part (which contains a return value, a method name, and a list of arguments) and a body (which contains the code that performs the action).
- main
- A special method that provides and entry point to the application.
- null
- When a reference variable does not have an output.
UML Class Diagram
- A UML Class Diagram summarizes the fields and methods of the classes/objects of a program.
Informações
- Descrição
- Mapa Mental sobre Object Oriented Programming, criado por Amanda DeVinney em 26-01-2020.
- Criado por
- Amanda DeVinney
- Visualizações
- 0
- Avaliação