Questions tagged as 'polimorfismo'

0
answers

Use STI with Devise

I'm using (or trying to use) STI with Devise . I have the User model (I added the type attribute), which I want to be the devise model and two models that inherit from user. I chose this approach and not just roles because the model...
asked by 04.09.2018 / 03:12
1
answer

subclass does not incorporate super class method

This is the first time I've had this error. I have the% class Loja that extends into several subclasses. problem is that subclasses do not "request" the super method Shop: public abstract class Loja { /** * Corresponde ao valor da area...
asked by 19.04.2018 / 22:52
0
answers

Attributes in Inheritance using abstract class

I'm wanting to use inheritance with parent class being abstract. The issue is that I'm using superscript toString () so that each impression of child classes can print their respective data. But when I use "this" inside the toString on the attri...
asked by 22.09.2017 / 00:04
1
answer

Access toString method from generic class [closed]

I have a generic Employee class and 3 other specific classes that inherit from Employee. Within the Employee class, I have the toString method. abstract class Funcionario { private String nome; private String documento; public...
asked by 31.10.2018 / 21:09