orientação-a-objetos

What are the differences between Overrideing and overloading in Java?

What are the main differences between overrideing and overloading in Java? What relationship is there between these terms and polymorphism?

What is the relationship between encapsulation and polymorphism?

A few days ago, I was talking to a friend about Java, and asked what part of the subject they were studying. Then he replied ... same thing"? if they are not the same thing, could you give some explanations and if possible, an example of how they work?

Best practices for using access modifiers

How to restrict other classes from accessing certain members (methods, variables/fields, nested classes/interfaces) of a clas ... oncepts of modifiers such as in the question what is the difference between public, default, protected and private modifiers?

Doubt about the calculation of the price

My doubt may seem simple to someone, but to me it's kind of killing me because I'm trying to find the error and I'm not getti ... iente() { return ingrediente; } static void printatotal() { System.out.println("Preco Final: " + totalingre); } }

Is using too many interfaces a bad programming practice?

I am a student in Information Systems and I am modeling a game, a virtual pet that has its needs and conversation with its ow ... ot ready, just a sketch) with so many interfaces is bad programming practice? When should I use an interface? Image link

What are the pillars of Object-Oriented Programming?

In general, I have seen some places saying that object-oriented programming has 3 fundamental pillars, in others I have seen ... ect-Oriented Programming? How do these pillars relate? are they the same for all languages that support object orientation?

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".

How to implement an abstract method in a child class?

I abstracted a method from an also abstract class. But I'm not knowing how to implement this method in the child class. He ... 7c119ffdccd3/como-implementar-um-mtodo-abstrato-em-uma-classe-filha?forum=cermicrosoftpt#054bda3b-40a6-4723-82ba-7c119ffdccd3

What is the difference in using the Equals method for the = = operator?

What is the difference in using the Equals method for the == operator in situations of comparing (1) Value Types and (2) reference types?

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?

Difference between object and instance

In Object-Oriented Programming a lot is talked about in both instances of classes and objects. Looking for the meaning of eac ... n instance '. (7) "[..] objects are instantiated from a class, and each object is referred to as an instance of the class".

What is the difference between attribute and field, in classes?

When I'm studying Object-Oriented Programming, at times I hear about Fields and attributes of a class, but the two seem to be ... to refer to the same thing. What's the difference? Taking advantage, can we say that a property is an attribute or a field?

Static methods in Factory Method

I am creating a class using Factory Method and I have the following question. Is it recommended to use static methods in f ... unction getType() { return 'Sedan'; } } /* Client */ $car = SedanFactory::makeCar(); print $car->getType();

What is the difference between Simple Factory, Factory Method, Abstract Factory?

What are the main differences between these design standards? In what situation can one pattern be better than the other?

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?

Composition and aggregation: what are the differences and how to use?

In object orientation it is common for objects of a certain class to have references to one or more objects of other classes. ... what are the utilities of differentiating these two cases and what is the difference of these two approaches in the practice?

Object orientation - how to find the right abstractions?

Actually the question I'm wanting to ask is exactly this: how to identify classes in an object-oriented system?. However, I w ... ead of finding the most appropriate one is also incorrect, finding the right abstractions seems a little harder than before.

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?

Inheritance, polymorphism and access to methods

I have 3 classes and 1 enum: public class Pessoa { private TipoPessoa tipo; public TipoPessoa getTipo() { ... te. And that this created object can access the members according to the option of the selected enumerator. How to proceed?