Questions tagged as 'polimorfismo'

1
answer

Is Connection Connection polymorphism?

Connection connection; connection = new ConnectionFactory().getConnection(); Can I say that doing this is polymorphism? The Connection receives the connection of class ConnectionFactory .     
asked by 13.02.2016 / 19:20
3
answers

C polymorphism [duplicate]

Is it possible to use Polymorphism in a structured language like C ? Languages like c++ , Java , etc (Object-oriented languages), have structures capable of inheriting functionality for code reuse (One of the reasons),...
asked by 04.02.2017 / 06:42
1
answer

Java Registration Creation

I'm creating an academic system in Java, but I have a problem. I have 4 classes ( Principal , Pessoa , Aluno and Professor ). I think it's something simple, the error that appears is in class Principal error:...
asked by 17.08.2016 / 21:16
1
answer

Menu with Polymorphism

I'm creating some examples to learn polymorphism more deeply, but in the original code, all functions work correctly. Original code: #include <cstdlib> #include <iostream> class Mamifero { protected: int idade; public:...
asked by 10.12.2016 / 12:57
1
answer

Java Academic System [closed]

Hello .. I need help setting up a Java program with the following specifications: 1) Read the following items from the user: Name (String), Age (int), Genre (char [M or F]), Phone (String), Address (String), cpf (String), rg (String), Neighbo...
asked by 16.08.2016 / 03:41
1
answer

Polymorphism with interface and abstract class

How do I make a method defined in the iDAO interface be passed to be implemented by class ProprietarioDAO , daughter of abstract class absDAO , which implements iDAO ? import { EntidadeDominio } from "../../models/Enti...
asked by 21.02.2018 / 15:49
3
answers

Form Inheritance created in Runtime

Follow the code below: type TfObject = class(TForm) private procedure FormShow(Sender : TObject); procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure FormClose(Sender: TObject; var Action: TClos...
asked by 15.02.2017 / 02:10
1
answer

Inheritance, polymorphism and access to methods

I have 3 classes and 1 enum : public class Pessoa { private TipoPessoa tipo; public TipoPessoa getTipo() { return tipo; } public void setTipo(TipoPessoa tipo) { this.tipo = tipo;...
asked by 25.03.2018 / 19:57
1
answer

Override static method

I do not know how to ask the question, but I'll try. I have a static method in a parent class, and I planned to overwrite it in the child classes, but from what I'm seeing here, that's not possible. I remembered a feature that has in Java, wh...
asked by 04.12.2017 / 13:03
2
answers

Error PHP POO Polymorphism

When developing a simple PHP POO application, I came across an unexpected error, and I have no idea why. I'm now starting to study object-oriented programming and I only have a small base in C #. The program itself is simple: two classes (...
asked by 19.10.2017 / 06:27