Questions tagged as 'herencia'

3
answers

Query about the reserved word "super ()" JAVA

Good afternoon, in my project I have the following attributes and constructor of an Abstract Class: //Attributes private int number; //Constructor public Card ( int number ) { this.number = number ; } Of which inherits the following C...
asked by 27.04.2017 / 21:21
1
answer

Problem that I have with inheritance in Java

public class GestionRepartoLocal { // CÓDIGO DE APOYO private ArrayList<Moto> motosDisponibles; private ArrayList<Furgoneta> furgonetasDisponibles; private ArrayList<Pedido> pedidosEsperandoMoto; private A...
asked by 01.05.2018 / 20:40
2
answers

Using Extends in Java

If in a project I want to call a method with another method inside, is it necessary to use extends ? I have done some exercise with extends and this but I do not understand the difference well, in this case that I explain, co...
asked by 01.04.2016 / 19:56
2
answers

Is there a default constructor with no variable that needs to redefine the child classes in C ++?

When compiling a program, I have a curious error: MaxSize.cpp: In constructor ‘MaxSize::MaxSize(int)’: MaxSize.cpp:7:26: error: no matching function for call to ‘TasMin::TasMin()’ MaxSize::MaxSize(int size){ In file included from MaxSize.h:1:...
asked by 25.04.2017 / 17:59
1
answer

Browse ArrayList with different java objects

I have a class Avisos of which two types of ads inherit. I save them all in an ArrayList and I could not access the getters of one of the children ads. I need to get ads of type AvisosLimpiar on a certain date and I am using the...
asked by 20.07.2017 / 01:56
5
answers

error method overloaded in java

Hi, can someone help me? I do not know why I get this error. abstract class Uno { protected int d1,d2; abstract public int devolver_suma (int x,int y); } class Dos extends Uno { public int devolver_suma(int x,int y) {...
asked by 16.05.2016 / 21:08
0
answers

Problems with inheritance in subclasses

I am having problems inheriting certain methods or attributes in subclasses of a given class. The problem arises when printing with the print to check if everything works correctly. But it seems that you are not inheriting variables defin...
asked by 27.10.2017 / 17:42
2
answers

Why does it return zero value?

in my programming class in form I have to show the area in a message, only that they want the data of height and width to get it from the inheritance of the class and in the way that the I'm doing it always returns zero in t...
asked by 04.10.2018 / 08:54
2
answers

Doubt with constructor when creating a JFrame. Java

I have a question at the time of being able to use the methods from a class that inherits from JFrame, like this: class MarcoLibre extends JFrame{ } In the constructor, I can access the methods that inherit from JFrame (and their correspon...
asked by 13.07.2018 / 19:38
2
answers

DERIVATIVE class of VIRTUAL class throws the following error: because the following virtual functions are pure within 'name_of_class':

I am working with classes and legacies and I found this first error in a much bigger program than the one I will present to you: undefined reference to vtable for class xxx Trying to recreate the error in a small program I found thi...
asked by 21.04.2017 / 23:30