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

Mapa mental

Objects and Classes

Logan Grimail Inglês

Conteúdo do mapa

Objects and Classes

  1. Classes

    • Classes are the templates that are used to create objects
      • For instance a class titles car could create two different objects
        • Car 2
          • color : red
            • license plate : sp33d
              • horsepower : 1000
        • Car 1
          • color : blue
            • license plate : 53jf1j4
              • horsepower : 300
                • although both cars are from the same class (or template) theyy are theyre own object
    • Classes are declared using two pieces of information
      • the class name
        • what the class will be called
        • It is common to capitalize the first letter of every word in a class name
          • for example: ClassName
      • the class body
        • showing what information will be inserted into the class
  2. Objects

    • Objects have two featurs
      • actions (fields)
        • for instance the object of a car would have the actions of accelerate, brake, park, etc.
        • Fields are variables that can also refer to objects
          • because of this it is posible that an object can contain other objects
      • attributes (methods)
        • for instance the object of a car would have the attributes color, number of tires, plate number etc.
        • Methods are what define what an objects class is able to do
        • to declare methods:
          • returnType methodName (listOfArguments
            • (the list of arguments can be empty though)
      • both of these are optional as some may have one and not the other, or some objects may have both
  3. Also... every class must contain a constructor before creating an object

    • the syntax for the constructor is..
      • constructorName ( ListOfArguments) {
        • [constructor body]
          • }

Informações

Descrição
Mapa Mental sobre Objects and Classes, criado por Logan Grimail em 26-01-2020.
Criado por
Logan Grimail
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?