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

Notas

Implementing Classes - created from Mind Map

John Hair Inglês 1 página

Conteúdo das notas (1)

Página 1

Superclass(parent) versus subclass(child)

Variables

Encapsulation

Extending to a class

Gives the subclass the ability to use the methods used before, or even add more.

Implementing Superclass

Abstract Classes

Interfaces

Abstract Methods: Methods with no body; must be given an implementation by the subclass.

A class that has one or more abstract methods.

A class made entirely of abstract methods. Must be implemented instead of extended. Famous interface is the Arraylist interface

Overriding an inherited method means providing a method in a child class with the same method signature (method name and parameter type list) and return type as a method in the parent class.

Overloading a method is when several methods have the same name but the parameter types, order, or number are different. Allows for multiple constructors in the same class.

Instance variables

Parameters

Private variables for only the class. Accessor methods can be written to give the programmer the variable using encapsulation

Variables given to the method.

Implicit: The object used to get to the method. For example, student.setAge(15);. The implicit parameter is the student object

Explicit: the value(s) the method will be taking in and using to run. For example, student.setAge(15);. "15" would be the explicit parameter.

Hides the instance variables by making them private. Generally, accessor methods will be public to allow the access of these private variables.

Informações

Descrição
Notas sobre Implementing Classes - created from Mind Map, criado por John Hair em 24-04-2018.
Criado por
John Hair
Visualizações
0
Histórico
  • Criado por John Hair · 24 abr 2018
  • Copiado para Nota por John Hair · 24 abr 2018
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?