classes

HashMap manipulation between classes (interpretation and application)

Is my first question, sorry for the extension, I am doubts in the following exercise: Create a Pizza class that has the ... diente por String, mas o método identifica como Integer p1.adicionaIngrediente(ingrediente.get("manjericao")); } }

Is it possible to create an' abstract class ' in Javascript?

When creating a class in Javascript whose attributes and methods are all static (for example, for storing predefined settings ... ility of class instantiation is necessarily a problem. EDIT: changed to fix and use the term " abstract "instead of"static".

require once does not work

I'm trying to give require_once in a PHP file that has a class. The file I'm trying to include in PHP with the class has on ... inside the class constructor, and it worked out, now I assign $db_data to an attribute and have everything inside the class.

What is the difference between a class and an object?

I was reading a book about object orientation and these two entities are traded differently. What is the difference between the two?

What is the difference between a state (referring to the state machine) and a class?

I would like to know how to differentiate a state, an interface of a class, what are its main differences? How can I tell them apart?

Is it bad practice to use only static methods in a class?

Was studying deeper OOP, learning more advanced concepts like polymorphism, Override, classes and final methods, abstraction, ... ervice ProjetoDoCara::Operar();. But then a question arose, if this is a good practice, does it not escape the rules of OOP?

How to create a class with attributes and methods in C++?

In Java I know how it does, but in C / C++ it's little different so how to create a class with C++attributes and methods? I' ... Tetes::~Tetes() { //dtor } Where Will I define the attributes and methods and also where do I create the constructor?

Concept of class, entity and objects

I'm reading about classes in C#, and one excerpt got me a little confused. I know that classes are objects in C#, and they c ... the above sentence would have to be different. When we talk about entities, can we refer only to the class or to any object?

What is the difference between init and new?

What is the difference between the special methods __init__ and __new__ in Python?

When should I use init in functions within classes?

For the book I am studying, in some moments the author uses __init__ as being a first function of a class. This function (and ... nd other classes, I am required to name it as: class Batata(object): Is this object mandatory at some point? If so, when?

Correct declaration MVC Ninject model Classes

I started using OO a short time ago and in all projects I see on the net, I see the following way of declaration. public cla ... e are using ADO with SP in the Bank). I tried to be as specific as possible, what is the problem with each of the approaches?

How to use operator= to copy a vector of pointers?

Having this class, I would like to implement, operator =, copy the vector of pointers to int to another vector, is it mandat ... n this case)? class ints{ private: vector <int*> inteiros; public: ints & operator=(const ints & i1); }

How to inherit more than one class in PHP?

Is there a possibility to inherit two classes in PHP? I have a class that already inherits the Class Usuarios and would like it to inherit the Class Crud as well. class Alunos extends Usuarios { }

Instantiate class or use public methods?

When using a method of a class, there are two approaches: instantiate the class and use the method by the object, or make the ... e = new Cliente(); cliente.cadastrarCliente(); Or make the method static and something like: Cliente.cadastrarCliente();

What is the difference between extends and implements in java?

I would like to know when they should be used and how we can distinguish them. I know that basically implements, it means that this class implements a class or an interface. And extends will be able to access the methods of the base class.

Problem with namespace and include

Good Morning. I have a webservice made in slimPHP . I have a class that is called control, and it belongs to the namespace co ... y of object offsets protected $buffer; // buffer holding in-memory PDF protected $pages; ..... }

Doubts about the toString () method of the Object class

I have been doing some tests with the toString() method of the java.lang.Object class and found that the result obtained chan ... at is it and how useful is this hashCode? Why does its value vary from one execution to the next if my code remains the same?

Object vector ordering

I'm making an application that sorts a vector of objects. These objects are Cartesian points, defined in the following class: ... sort.cpp:33:5: error: no matching function for call to 'sort' std::sort(myvector[0], myvector.end()); What's wrong?

Does Java not have multiple inheritance?

I had seen somewhere now I don't remember, I think it was in a course on object orientation, which Ruby owns. But in Java I have never seen. is that why you use abstract classes? Or is this meaningless?

How does cross-class inheritance work in C#?

I have Class 1 and Class 2, Class 2 inherits from Class 1. Will other classes that inherit from Class 2 inherit attributes from Class 1?