O GoConqr está de visual novo! Conte para nós o que você achou.

Mapa mental

Object-Oriented Programming: Using real life situations to create a model to solve a problem

Aubrey Schnars Inglês

Conteúdo do mapa

Object-Oriented Programming: Using real life situations to create a model to solve a problem

  1. Java object: has attributes (fields) and performs actions (methods)

    • Java objects represent real-world objects but with less details
      • To assign a created object with an object variable: Ex: Employee employee = new Employee();
      • To call an objects methods or fields: objectReference.methodName objectReference.fieldName
  2. Java class: a tempate to create objects of similar types

    • Syntax for a class: class className { [class body] }
      • Each word in a class name is capitalized. ex: Employee, DateUtility
      • Class file must be saved as className.java
  3. Fields: variables that are primitive or references to other objects

    • Should follow camel naming convention. Ex: age, maxAge
  4. Methods: actions that an object can take

    • Method declaration contains a return value, method name, and list of arguments
      • Declaration syntax: returnType methodName {listofArguments}
      • Return type void means that the method returns nothing
      • ex: Address getAddress() // returns an address object
    • Constructor method: Constructs the object and does not have a return value
      • The compiler will add one for you if not defined
  5. "main" provides the entry point to the application

    • Syntax for the main class: public static void main {String[] args}

Informações

Descrição
Mapa Mental sobre Object-Oriented Programming: Using real life situations to create a model to solve a problem, criado por Aubrey Schnars em 28-05-2021.
Criado por
Aubrey Schnars
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?