Freddy Barreiro
Quiz by , created more than 1 year ago

Quiz on Java Herencia Casting, created by Freddy Barreiro on 28/11/2018.

103
0
0
Freddy Barreiro
Created by Freddy Barreiro over 5 years ago
Close

Java Herencia Casting

Question 1 of 9

1

¿Una Clase puede extender otra clase?

Select one of the following:

  • True
  • False

Explanation

Question 2 of 9

1

Indica que palabra clave se utiliza para crear una suclase.

Select one or more of the following:

  • ampliar

  • private

  • extends

Explanation

Question 3 of 9

1

public class Car Vehicle {
private int noPass;
}

Drag and drop to complete the text.

    extends
    extender
    apmlpiate

Explanation

Question 4 of 9

1

Las clases se pueden extender repetidamente, es decir tenemos clase a la extendemos a clase b luego a clase c y se puede seguir extendiendo las clases?

Select one of the following:

  • True
  • False

Explanation

Question 5 of 9

1

Identifica el método constructor de la clase:

public class Vehicle{
private String color;
(String c) {color=c;}
public void moveForward(){…}
public void moveBackward(){…}
}

Drag and drop to complete the text.

    public Vehicle
    Private vehicle
    Vehicle void
    Public Vehicle

Explanation

Question 6 of 9

1

Completa con los métodos:

public class Vehicle{
private String color;
public Vehicle(String c) {color=c;}
(){…}
public void moveBackward(){…}
}

Drag and drop to complete the text.

    public moveForward
    void moveForward
    public void moveForward

Explanation

Question 7 of 9

1

Select from the dropdown list to complete the text.

Completa con el nombre de la superclase:

public class Car extends ( Car, Trucks, Vehicle ){
private int noPass;
public Car(int n, String c){…}
public void enter(int n){…}
public void exit(int n){…}
}

Explanation

Question 8 of 9

1

Cual de las siguientes palabras reservadas se usa para llamar a un método constructor de una superclase desde una subclase:

Select one or more of the following:

  • call

  • super

  • void

Explanation

Question 9 of 9

1

Indica el tipo cual de las siguientes conversiones se pueden realizar.

Select one or more of the following:

  • De un objeto de subclase a un objeto de superclase.

  • De una objeto de superclase a un objeto de subclase.

  • Entre dos objetos de clases hermanas

  • Entre tipos de datos primitivos

  • Entre datos primitivos y clases

Explanation