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

Mapa mental

Object-oriented Programming

Rachel Johnson Inglês

Conteúdo do mapa

Object-oriented Programming

  1. Classes: template to create identical types of objects

    • Objects: living, non-living, abstract, or concrete
      • Attributes = fields
        • Capitalize the initial of each word except the first one
      • Actions = methods
        • Capitalize the initial of each word except the first one
        • returnType methodName (liistOfArguments)
          • Ex: double getSalary ()
            • Ex: int add (int a, int b)
      • use a period to call a method or field
        • objectReference.methodName
          • objectReference.fieldName
        • see note for example code
          • Employee employee = new Employee () employee.age = 24 employee.salary = 50000
    • class className { [class body] }
      • class body contains fields and attributes
      • Capitalize initial of each word of each class name
  2. The Method Main

    • Entry point into the application. Only one class needs it
    • Passing arguments to main: java className arg1 arg2 arg3
      • Must pass arguments as strings
  3. Constructors: every class needs at least one

    • Similar to a method but without a return value
    • Must have same name as class
    • constructorName (listOfArguments) { [constructor body] }
    • One is assigned if you don't write one
  4. Creating Objects

    • 'New' command
      • new Employee ()
        • Employee employee = new Employee ()

Informações

Descrição
Mapa Mental sobre Object-oriented Programming, criado por Rachel Johnson em 18-05-2020.
Criado por
Rachel Johnson · mai 2020
Atualizado
18 mai 2020
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?