Most voted "classes" questions
In object orientation, a class is a structure that abstracts a set of objects with similar characteristics. A class defines the behavior of its objects through methods and possible states of these objects through attributes. In other words, a class describes the services provided by its objects and what information they can store.
Learn more…715 questions
Sort by count of
-
-2
votes1
answer38
viewsUse a 30 x 3 array using class, def, parameters - Python
The intention here is to use a matrix capable of storing in each position all the information related to a given service (number, value, service code, customer code). Each row represents one day of…
-
-2
votes1
answer46
viewsi am not managing to inherit the client class with one of the two
i create a client that will be Pfísica as I do for class Pfisica inherit from class client. class Cliente: def __init__(self,*lista,**D): self.codigo = D.pop('cod','--') self.nome = D.pop('n','--')…
-
-2
votes1
answer48
views -
-2
votes1
answer84
viewsWhy, when not using "this", the method does not reflect changes made to the object?
class Endereco { constructor(Rua, Cidade, CEP) { this.Rua = Rua; this.Cidade = Cidade; this.CEP = CEP; this.exibirEndereco = function() { console.log(`Endereço: Rua ${Rua}, Cidade de ${Cidade}, CEP…
-
-3
votes1
answer178
viewsHow many classes can we have in one package?
How many classes can we have in a single package?…
-
-3
votes1
answer403
viewsCreate classes and functions in c++
One can give an example of how to create the main, the . h, and the . cpp in c++? and also connect them all. For example, having a function that receives an input value a, having another class that…
-
-3
votes2
answers147
viewsHow do I turn a class into a clickable text?
Here’s the class I wanted to turn into a clickable text <li class="content__container__list__item">Select a Language !</li> I hope someone tells me how I can do this!…
-
-3
votes1
answer26
viewsSearch day, time and add class to a form
I asked a question a while ago here and they helped me a lot. I managed to make a code searching the day of the week (Saturday and Sunday) and adding a class to the form to disable it. Follow:…
-
-3
votes1
answer33
viewsWhen I run the error appears: "Car() takes in Arguments". Can anyone help me? I don’t know what I did wrong
class Car(): """Uma tentativa simples de representar um carro.""" def _init_(self, make, model, year): """Inicializa os atributos…
-
-3
votes1
answer51
viewsJava class with float and int
I am developing an MVC project with Java for web using eclipse. In the table database product is like this create table Produto ( Idproduto int identity primary key, Nome varchar(40), Preco…
-
-4
votes1
answer1085
viewsWhat is the difference between class instance variables, automatic (local) and static duration variables?
What is the difference between these variable types? How to identify them? How does C# work with them?
-
-4
votes1
answer95
viewsWhy are you making a mistake in calling a method?
I’m trying this code: class Car: def beep(): print('Beep') car = Car() car.beep() Typeerror: method() takes 0 positional Arguments but 1 was Given 'Cause there’s a mistake?…
-
-4
votes1
answer35
viewsINTELLIJ + JAVA PROBLEM
Good evening before everything I want to say that I’m a complete beginner and I’m taking a Java course at Udemy and when I’m creating a class the class name is highlighted red and can’t "interact"…
-
-4
votes1
answer76
viewsProblems in PYTHON end result
I am a beginner in Python and I am developing a calculator, creating a class, within it there are 4 functions, being the 4 operations. And in the main only the basic input. My goal in this program…
-
-6
votes1
answer40
viewsWhy am I not able to create a function within a class named after the array list of a class method in php?
Why am I unable to create a function within a class named after the array list of a class method in php? function $this->info[0](){ }