Most voted "getters-setters" questions
Getters and Setters are methods used to retrieve and assign values (respectively) to variables without having to work directly with them. If the question is not about "Getters and Setters", do not use this tag even if you are using "Getters and Setters" in your project.
Learn more…64 questions
Sort by count of
-
0
votes1
answer27
viewsDoubt eclipse tool
It is possible to generate Getters and Setters automatically only of selected variables?…
-
0
votes1
answer53
viewsgetter-Setter error #python
I wonder where is the error in this supposedly simple code class Nome: def __init__(self,nome,sobrenome): self.__nome = nome # variável privada self.__sobrenome = sobrenome # variável privada…
-
0
votes1
answer172
viewsHow to split the addressing of a class into PHP?
What is the best way to divide this Aluno? <?php class Aluno{ private $nome; private $sobrenome; private $email; private $telefone; private $cep; private $rua; private $endereco; private $numero;…
-
0
votes0
answers98
viewsHow to use Object.value in Vuex Getters module
in a. Vue or Vue html file, I can use a v-if with the following snippet Object.values(this.dialogs).filter((v) => v).length !== 0 and works as expected but in a file. js more precisely in a vuex…
-
0
votes2
answers74
viewsCreate methods in classes to manipulate fields
I made a code of a binary association between two classes Cliente and Caixa, some methods I might not understand how they are inserted into the code in logical way, but the code itself is working, I…
-
0
votes1
answer78
viewsDoubt on the Setter
class Bola: def __init__(self, cor, circunferencia, material): self.__cor = cor self.__circunferencia = circunferencia self.__material = material @cor.setter def cor(self, cor): self.__cor = cor…
-
0
votes2
answers28
viewsAccess Different Jframes objects (JAVA)
Good afternoon, Can someone help me with a project? I’m developing a simple vaccine system, but I’m having a hard time accessing attributes between a Jframe and another since in each Jframe I have…
-
0
votes0
answers32
viewsGetters, Setters and Constructors (JAVA)
Good afternoon guys! Okay? I hope so! Well, I started my studies about 3 months ago in java and programming in general. Well, I am in a stage selection process and I started to study POO (Object…
-
-1
votes1
answer41
viewscheck in settter - java method
I am doing an exercise in java that asks to calculate the area of a rectangle, if the usurer type some number smaller or equal that "0.0" should appear an error message, but this verification must…
-
-1
votes3
answers54
viewsProblem when consulting the registered position where it shows null value
Hello I am new in programming but I am developing a code through the advanced Java course of Bradesco site and there the last part is to assemble a system, however I have a problem in the…
-
-1
votes2
answers175
viewsSetters in an array
I have a array of private integers separated into one class (Obs.: I did so to train the use of the get and of set) and another class that must set values at the addresses of array. This is a…
-
-1
votes1
answer125
viewsHow are these Setters methods not being used?
I’m creating a Java/Android app where your job is basically to display a list for the user about what items we still have available in stock. To make this list I used a Recycler View, data (stock…
-
-3
votes1
answer55
viewsError using Decorator in a Setter method
I’m trying to implement a simple Python code to practice using decorators in conjunction with advisory methods (Getters and Setters), but I’m getting an error. The code is as follows:: class…
-
-4
votes1
answer81
viewsError with constructor
MyCircle c = new MyCircle(2,5,8);/// Instanciei um objeto no main. public class MyCircle { private MyPoint center; private int radius=1; public MyCircle(int x,int y,int radius) {…