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
-
0
votes1
answer956
viewsEclipse Debug Settings
Good afternoon. I’m having a problem debugging my project on Eclipse. Native java classes are appearing in the debugging process when the only classes that are interesting to me are the ones that…
-
0
votes0
answers47
viewsCOM component interface (Interop)
Someone could help implement Interface to create a DLL interop of that classe? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using…
-
0
votes1
answer165
viewsHow to resolve error: illegal Static declaration
I have 2 classes that work well independently of each other. I joined the 2 in one and got 3 build errors, the error message says: ilegal static declaration. how to solve error on lines 42, 58 6 69.…
-
0
votes1
answer46
viewsDatabase query, main class returns zero
I am making a query by taking only one field and one line and setting in a variable of the main class, the question is that within the Try below, the variable shows the result of the query correctly…
-
0
votes1
answer1360
viewsCall any function of another class of the same type
I need to pass as a parameter to a member function another member function (but of another class). I can do this for same class functions, but from another #include <iostream> using namespace…
-
0
votes2
answers86
viewsChange type of return
How do I change the return type of a mother class function in the daughter class? For example: class Mother { public: void Get() {} }; template <typename Type> class Child : public Mother {…
-
0
votes2
answers85
viewserror: use of Deleted Function Fight::Fight()'
Good afternoon, I am experiencing several problems when compiling the code below in the code::Blocks with g++ and I would like to get help, thanks in advance. Content of main.cpp: #include…
-
0
votes0
answers957
viewsError: Unable to find or load main class
have tried: Unable to find or load the main file class.java I’ve tried the system and it still works like when I use it javac arquivo javac -version java -version everything works more when I use…
-
0
votes2
answers574
viewsInstalling and configuring Composer on my localhost
To use the local Composer I should install it in the folder where my projects are located? In case C:/Users/Me/Jobs... And as there are several projects (sites), for each one I must have the…
-
0
votes1
answer1005
viewsNo data was sent by server
When trying to access my route default in the browser is shown the error of the browser itself, in the case of Opera: The dev.local page is not working No data was sent by dev.local In the case,…
-
0
votes1
answer108
viewsAdd images in the bd using classes in c#
i am doing a project that has classes, for example, a User class, where you have :code, name, password and photo and you have the user input method: public string Inserir() { return "insert into…
-
0
votes1
answer104
viewsGet click (this) element in method
I’m refactoring a SPA using in practice the MVC with classes and etc... I made a method that is called when I click on an element <i> and would like to obtain this element to subsequently…
-
0
votes1
answer52
viewsPython procedure for Problem class
I’m having trouble turning a function into a python class: from bs4 import BeautifulSoup from selenium import webdriver import html2text # driver.page_source = driver.get())# def getPEP(strg):…
-
0
votes0
answers23
viewsWhy do some classes start with points and others don’t?
In CSS, when defining class H2, for example, it does not start with dot: H2 { color: red; } But other classes need the point: .text-red { color:red; } Why does this happen?…
-
0
votes1
answer271
viewsInstantiate dynamic named class in Javascript
There is a way to instantiate a Javascript class whose name is contained in a string type variable? For example: class User { constructor(...args) { console.log(args); } } const className = 'User';…
-
0
votes1
answer101
viewsmethod chained in class with static methods
Good afternoon to all!!! How do I create a chained method, being it a static method? example: echo class::mymethod->$variable; Thank you
-
0
votes1
answer120
viewsInstantiating an object of one class within the constructor of another class
[SOLVED]How do I prompt the Mars object within the Rover class? For, is returning me the following error: "Mars is not defined" class Rover{ constructor(orderedX,orderedY,orientation,toMove){…
-
0
votes1
answer170
viewssubclass does not incorporate super class method
This is the first time I’ve had this mistake. I have the Class Loja that extends into several subclasses. problem is that subclasses do not "ask" the super method Shop: public abstract class Loja {…
-
0
votes2
answers94
viewsAccessible class across C#
I would like a class that is not static to be available for the entire application. At first I thought about turning this class into static, but for obscure reasons that are beside the point, I…
-
0
votes1
answer36
viewsCalling a method
Hello, I would like to do something extremely simple, but I’m having difficulty applying. I made the following class: public class nome { string aluno = "Olá, eu sou um aluno"; string aluna = "Olá,…
-
0
votes1
answer40
viewsC++: Elements just below the constructor call of a class
In my teacher’s code, he passed the following class template, with the constructor defined below: template<typename T> class CircularBuffer { std::vector<T> _elements; size_t _first, _n;…
-
0
votes2
answers39
viewsHow to view class information
I want to show the values of a class but I don’t know how to access it. The result of print_r($this->order); showcase WC_Order Object ( [status_transition:protected] => [data:protected] =>…
-
0
votes1
answer320
viewsClass at Angular 2
This is my class at 2 export class LinhaModel { _id: string; Cidade: { id: string; CidadeNome: string; } Operador: { id: string, OperadorNome: string, } DiaOperacional: { id: string,…
-
0
votes2
answers415
viewsCalling functions in ngClass
I’d like to call in functions in the ngClass. I was able to call only the function, and if I want to call other classes it does not take, if I just put the function in the class it can…
-
0
votes1
answer74
viewsWhere should I instantiate the objects?
In POO there is a certain degree of theory and good practice for writing classes and interfaces. They are inside folders with established nomenclatures. The class name must be identical to the file…
-
0
votes0
answers57
viewsobjects sharing the same copy of a variable
The goal is to put into practice the contained concepts that I am learning in MALA GUPTA, 2015. So the way I’ve found to contribute is to ask the community to actually implement the concepts. So who…
-
0
votes1
answer118
viewsHow do I switch a class of buttons that trigger a player to appear and hide?
I have 3 buttons in Link format with the classes: . icon-play, . icon-pause and . icon-download, I want to change the play class with pause, as well as the reverse without influencing the download…
-
0
votes0
answers433
viewsUpload images by php form and display together in one image
I am trying to develop a simple badge generator that can receive 3 images 1° background, 2° employee photo, 3° company logo that way currently, and present employee name and your sector. Currently I…
-
0
votes2
answers107
viewsHow do you inherit a pygame class?
When I run this code (this is the current entire code, ie only 3 lines): import pygame class sp(pygame.sprite): pass I get: Typeerror: module() takes at Most 2 Arguments (3 Given) I would like to…
-
0
votes1
answer26
viewsHow do I transfer data from the inherited array(Objects) to the array(reserves)?
package pkg2017ppfp09; import ObjectManagement.ContainerOfObjects; /** * * @author pf */ public class GestorDeReservas extends ContainerOfObjects{ private final int MAX_RESERVAS = 10; private final…
-
0
votes1
answer76
viewsHow to use the Search Bar with the person class - Swift 3
Good morning. I have the class person class pessoa { var nome : String = “”; var idade : Int = 0; var foto : UIImage!; } extension pessoa { class func Gerar_Registros(pQtd : Int) ->…
-
0
votes0
answers398
viewsBringing files, classes and methods from another Python file
I need to bring a class file like this that is in class.py: class Despesas(object): def __init__(self): self.Prioridade = Prioridade() self.Situacao = True self.Valor = 0.0 self.Categoria = '' To…
-
0
votes1
answer154
viewsInsert class in PHP does not work and shows no error
I got the following code in php: <?php class Users extends DB { private function verifyUser($email) { $select = self::conn()->prepare("SELECT * FROM `users` WHERE email = '{$email}'");…
-
0
votes1
answer56
viewsJava Class and Variable Problem
I created a class, Inside it I need to call some methods but it has to be what is typed inside the Jtextpanel, someone knows how to do? This is my class Pick: public class Escolha { public static…
-
0
votes2
answers51
viewsVariable declaration
I do not know what is the subject of this part of Java, but I did not understand it: Carro carro; I know that when declaring the variable we do: String carro; Why is there such a thing Carro? and…
-
0
votes1
answer226
viewsProblem with namespace and include
Good morning. I have a webservice made on slimPHP . I have a class called control, and he belongs to the namespace controllers, it works normally without problems , but there arose the need to…
-
0
votes1
answer67
views"login" method error using php and Pdo object orientation
good afternoon, I am in error when logging into my restricted page... SCREAM: Error suppression ignored for ( ! ) Fatal error: Call to a member function logar() on a non-object in…
-
0
votes1
answer46
viewsHow to make one class interfere with another with python
I want to make a switch button with kivy style, when one is true, the other is false, however, when I change a variable in the class of the first, it is not changed in the second, and remains with…
-
0
votes1
answer86
viewsChanging the background of a Section
Section has a set background how do I move the mouse in image 1 change the background of the current overlap Section, remove the mouse back <section class="modules"> <div…
-
0
votes1
answer804
viewsHow to create a list of objects of variable size, and assign their attributes without listing them one by one?
I need to read a file and pass your information to a list of objects. The file is in format: "attribute 1", "attribute 2", "attribute 3", ...,"attribute" each row contains the information of a…
-
0
votes0
answers94
viewsString and double data entry
I’m in a project to implement a C++ calculator that uses variables. Thus, if I define a variable x = 5, and type x 2 then returns me the value of 25. For this, I have to store the variable name and…
-
0
votes1
answer2833
viewsConditional class relationship diagram
I made a diagram and modeled the Partners class to involve customers, suppliers, service providers, etc., which will inherit attributes from the abstract classes Pessoa->Física or…
-
0
votes1
answer191
viewsError when compiling C++ source code along with header file and member function file
Hello I would like a help with this exercise code. This is my first time trying to ask a question here. When I try to compile the file with the member functions Gradebook.cpp or the file containing…
-
0
votes1
answer62
viewsHow to pass structures to templates class functions
I just don’t understand why it’s wrong. This code works. template class test{ public: struct st1{ T a, b, c; }; struct st2{ T d, e, f; }; T foo1(st1 *st); st1 *foo2(); }; template typename test::st1…
-
0
votes1
answer446
viewsInstantiate class in method parameter or within method
Working with an Laravel controller I came across something similar to this: public function show(Role $role) { // é apenas um exemplo. } Where the Role class is instantiated in the variable $role…
-
0
votes2
answers27
viewsI need to make an automated selection
Hello, I would like help to execute an automatic selection command on this: <select tabindex="-1" class="select-large"><option value="-">[Escolha...]</option> <option…
-
0
votes3
answers164
viewsI can’t find the button with the querySelector
Hi, I’m trying to find a button by Document.querySelector but I’m not getting it. I tried looking for it with the command: document.querySelector("button.tabindex[class='btn btn-inverse btn-large…
-
0
votes0
answers194
viewsTurn CURL into class
I would like to transform my code curl which is structural and puts it into a classe, but I’m out of logic, I DON’T WANT ANYTHING READY, just want examples, see my class. <?php $cookie = [];…
-
0
votes1
answer340
viewsPolynomial class - list assignment index out of range
Save people, I’m learning classes in python and created one for application with polynomials, but I’m not able to add two distinct polynomials, always appears the following error: File…
-
0
votes2
answers194
viewsEntity Endereco Compatilhada
Modelling a project I associated an entity Addressee at the Root of Aggregation Client. So far so good. However, I later found that other entities or roots of aggregation such as Enterprise and…