Questions tagged as 'classes-abstratas'

1
answer

LINQ to SQL with entities that already exist, inheritance and composition

I'm starting to study LINQ to try to implement a project I'm working on. For examples in articles as in videos, LINQ has an interface in Visual Studio that generates the entity classes from the tables in the database. However, in my application...
asked by 15.04.2016 / 00:29
1
answer

Abstract classes in Python

The __subclasscheck__ method must be defined at the metaclass level, since the __subclasshook__ method can be defined as a class method since the class has a ABC metaclass (or one of its derivatives). My question is when we c...
asked by 02.04.2018 / 08:36
2
answers

Store changed properties of a class

I need to have a list with (name and value) of the changed properties stored in the class itself. But I'm not sure what form I'm using is feasible. I have the Employee class below: public class Funcionario { public int IdFuncionario { g...
asked by 05.02.2015 / 14:16
1
answer

How do I inherit an abstract class in C ++?

In Java we have the possibility of creating abstract classes, but without the possibility to instantiate them, but we can create and instantiate a class that inherits the attributes and methods of an abstract parent. In C ++ this is done in a di...
asked by 25.11.2017 / 22:27
1
answer

How to create an abstract class in C ++?

In C ++ use virtual .cpp file #ifndef TETES_H #define TETES_H class Tetes { public: Tetes(); virtual ~Tetes(); virtual void exibeDados(); protected: private: }; #e...
asked by 15.03.2016 / 15:41
1
answer

How to define a subclass of an abstract class so that it is concrete

With these classes: class SerVivo { public: virtual void funcA() = 0; virtual void funcB() = 0; }; class Vegetal : public SerVivo{ public: virtual void funcB(){ cout << "funcB em Vegetal \n"; } virtual void funcC() = 0; };...
asked by 20.02.2018 / 13:43
1
answer

Define an abstract attribute in a non-abstract class

I want to be able to instantiate an employee class (so this can not be abstract) and have an abstract salary attribute that will be static for each employee type. I can do (in the official class): private abstract int salario; and its su...
asked by 19.11.2017 / 14:52
0
answers

Doubts on Abstract Classes and Interface (java) [duplicate]

Before stating my doubt, it is valid to make it clear that in some way I understand the difference between the two. I know that an abstract class can have implemented methods, attributes, constructors, and needs at least one abstract meth...
asked by 08.10.2017 / 00:40
5
answers

What is and what is an abstract class for?

In object orientation, what is the meaning of an abstract class? What is its purpose?     
asked by 17.09.2015 / 15:07
1
answer

Force the implementation of certain type of abstract method

In Python it is possible to define classes abstratas and métodos abstratos in a slightly simple way, for example: class Spam(ABC): @abstractmethod def grok(self): pass This class can not be instantiated...
asked by 22.10.2018 / 03:36