¡GoConqr estrena diseño! Cuéntanos qué te parece.

Fichas

Abstract

José Alfredo Santes Benítez Informática y Comunicaciones Inglés 8 fichas

Fichas del conjunto (8)

  1. 1Abstract ClassClasses defined as abstract may not be instantiated, and any class that contains at least one abstract method must also be abstract.
  2. 2Abstract MethodsMethods defined as abstract simply declare the method's signature - they cannot define the implementation.
  3. 3What to do if I have an abstract class with abstract methods?When inheriting from an abstract class, all methods marked abstract in the parent's class declaration must be defined by the child; additionally, these methods must be defined with the same (or a less restricted) visibility.
  4. 4What to do if I have an abstract protected method?If the abstract method is defined as protected, the function implementation must be defined as either protected or public, but not private.
  5. 5Is it the same interface and abstraction?No, an abstract class can provide some functionality and leave the rest for derived class, and the interface cannot contain any functionality. It only contains definitions of the methods.
  6. 6Characteristics Part 1The derived class may or may not override the concrete functions defined in base class
    The child class extended from an abstract class should logically be related
  7. 7Characteristics Part 2Methods that are declared as abstract will not contain method body or method implementation. It can have only the method signature
    When inheriting from an abstract class the child class must implement all the methods named as abstract in the parent class
  8. 8Characteristics Part 3When inheriting from an abstract class the abstract methods implemented in the child class should be of the same or lesser visibility
    Abstract classes may have non abstract methods (which has a method body)
    you cannot implement an abstract class, you can only extend it

Información

Descripción
Abstract
Visitas
40
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?