Most voted "oop" questions
Object orientation is a paradigm of analysis, design and programming of software systems based on the composition and interaction between several units of software called objects.
Learn more…1,456 questions
Sort by count of
-
0
votes2
answers83
viewsHow to instantiate an object according to a Front End event?
Good afternoon, Folks. I don’t know if my question makes much sense, but here goes. For example, I have a class that has several functions, and I have my Index.php Here we go, when I load the index…
-
0
votes1
answer57
views"Nullpointerexception" error is null
I have created a student and teacher registration program. You have a List option as well. However, when I go to register the teacher he gives the following error "Exception in thread "main"…
-
0
votes0
answers60
viewshow to pass data from a Double Chained List to a graphical interface?
I am very beginner in programming and I am coding this program for a job. I have a "Filmoteca", I need to navigate through a list chained with a graphical interface. I don’t know how I can navigate…
-
0
votes1
answer304
viewsPDO inserting null
I’m trying to create a simple screen of user registration, but I’m having problems performing the insert. The method is executed but the MySQL inserts null instead of form fields I get through a…
-
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
answer133
viewshow to convert my object into a string?
I did a function to insert the data into the database, but since I am using classes, I have to insert a class object into the database that will contain the data of the person in question, only that…
-
0
votes1
answer284
viewsClarification of MVC archiving in PHP
Good afternoon guys, I’m starting with php OO and MVC, I wonder if the portion of code below escapes the standards, and if there is any improvement to be implemented. From now on I thank all those…
-
0
votes0
answers41
viewsHow to recover parameters passed by the use() method, within a function?
I’m studying callbacks and I came across a method that I can’t recover and I find it even simpler to send the variables inside the function that is the operator use, but I don’t know how to get it…
-
0
votes0
answers63
viewsHow do I get a die from a class that was set in another class?
I have a question in my application. I would like to retrieve data from one class that has been set in another. However when I do data recovery it turns null. Here is my object class geraHash {…
-
0
votes2
answers16529
viewsCannot set Property 'innerHTML' of null
I tested the code below and returned me the error: p1-rad1-RE_UP.html:35 Uncaught TypeError: Cannot set property 'innerHTML' of null at Object.listarTodos (p1-rad1-RE_UP.html:35) at…
-
0
votes1
answer48
viewsProblems with PHP function - PDO
Fatal error: Call to a member function prepare() on a non-object in C:\xampp\htdocs\trofeugs2017\model\Model.php on line 81 How to correct the error? Code: <?php class Model { protected…
-
0
votes1
answer1003
viewsMost suitable mapping of JSON to Java object
I need to work with a JSON that has recipe information. This JSON has an object (Recipe) with some object arrays (Ingredients, Steps). What would be more appropriate from the point of view of object…
-
0
votes2
answers87
viewsI’m having trouble comparing two numbers in php
I’m a beginner in php and I’m trying to compare two numbers but when I send the numbers to my other page ends up giving error, I would like help and if possible a very detailed explanation of what…
-
0
votes1
answer88
viewsUndefined Variable using this
I’m creating a basic class for database operations, but apache gives me two errors on line 12. Because the connection is an attribute I refer to the this. Why at the first reference when connecting…
-
0
votes1
answer1145
viewsFatal error: Call to a Member Function prepare() on a non-object
I am creating a class to perform querys in the bank, but am having the following error when I have use Prepared statements: Fatal error: Call to a Member Function prepare() on a non-object in C:…
-
0
votes2
answers2327
viewsObject vector in C++
How do I vector objects using c++? And how do I sort this array of objects, for example, using some sort algorithm (quicksort, mergesort, shellsort or radixsort)? #include <iostream> using…
-
0
votes2
answers1543
viewsAggregation in Java
I would like to create a method in my class Teacher that would calculate your salary based on your workload, which is a function established in the Discipline class, a teacher can teach several…
-
0
votes1
answer809
viewsRun python kivy file
I’m doing a crud maintenance using python/kivy. It’s four main files, one for table P, one for A, and one for C. The fourth main file is the main screen that will have three buttons for you to…
-
0
votes0
answers274
viewsUse php and Ajax class
good morning The question is as follows, I have a class of "user.class.php", where within it are my attributes, and all methods(Insert, update, delete, search code and etc...) private(){ ...todos os…
-
0
votes1
answer301
viewsError while deleting with PHP using PDO class and object orientation
I’m making a delete on my form manut_usuario, below is my method to delete which is in class usuario.class.php; public function DelUsu($id){ try{ $delUsu = "DELETE FROM usuario WHERE idu_usujport =…
-
0
votes1
answer324
viewsC# - Passing data between Windows Form using Listview
I have a project in C# Windows Form, in my project I have 2 screens, 1 - Listview to show the information, 2 Form to get the user data and pass to Form1 Listview, but the problem is: pass the…
-
0
votes1
answer189
viewsCreate another class or not? PHP/POO
My question is the following: I have two tables and classes of finance, one for Despesas and another to Receitas. The two have some identical columns and some different ones. I need to use a method…
-
0
votes1
answer282
viewsDo I need to include classes when I inherit?
Following. When I want to use something, for example, on the index, I want to pull a class to make an object, right? Imagine the class is like this: <?php class Testando{ //Meu codigo aqui }…
-
0
votes1
answer92
viewsChange background according to Javascript temperature
I did a Freecodecamp project where it’s to make a Weather Local (Local Weather). I used their own project API, already ready, but it does not change the background. I want to change the background…
-
0
votes1
answer644
viewsC#, Returning an Sql Server query in Data Grid View
I have a bizarre problem, I have a table in the database Sql Server, where there is a field bit, I’m pulling data from this table, which is actually a View. I do my instruction Select, and executed…
-
0
votes2
answers368
viewsC# and Sql Server, inserting with proc using BEGIN TRAN
Good night! I am entering a record using the C# and Windows Forms, I am using a proc that inserts in two tables at once, the code is working, but, I created a rule that the store can only have only…
-
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
answer193
viewsReport one object at a time with Jaspersoft Studio
I have a system of loose notes in jsf and primefaces. I was able to generate a set report of several notes at the same time, searching through two input parameters, initial date and final date. But…
-
0
votes1
answer36
viewsDifficulty validating the login
I have this code for an application from an online store but since I’m new in php I’m having some difficulty validating the login because when submitting the form it accepts everything you have…
-
0
votes1
answer59
viewsAccess to PHP objects on other pages
I’m starting to program object orientation in PHP. I came across the following problem: I have a class Usuario and I need to access the object as soon as I do login on the site, however, when I try…
-
0
votes2
answers173
viewsIndependent member function in C++
I am learning POO with C++. I made a program here to train object arrays question. My question eh: The program is working, but was it efficient that I put the function display2 as independent? I…
-
0
votes1
answer441
viewsProblem printing matrix c++
I’m trying to read an array and print it completely, but it’s only coming out the last line and I don’t know why. #include "matriz.hpp" #include <iostream> Matriz::Matriz(){ char matriz[0][0];…
-
0
votes0
answers859
viewsGame of life c++
Hello ! I am developing the game of life and I am not managing to get the rules applied correctly(I do not know if it is due to the function that prints or the function that checks the rules). For…
-
0
votes1
answer710
viewsDoubt Exercicio Collections - Queue Interface
I’m having a question in this exercise about Collections in which I should use the Queue interface : Write a program that simulates control of an airfield at an airport. In this program, the user…
-
0
votes0
answers345
viewsGeneric crud with phpoo and Pdo (no framework)
I want to make a kind of Generic Crud and I implemented the function of Insert, I know that the way I did is not a better way to do it and I don’t want to use any kind of frameworks and so I would…
-
0
votes1
answer98
viewsStrange values when generating array in a dynamic object in PHP
Follow this example code: class Object{ private $keys = []; private $values = []; public function criarArray(){ $obj=get_object_vars($this); foreach($obj as $key => $value): $this->keys[] =…
-
0
votes1
answer123
viewsHow to work with if in a Vue.js application
I am new as Javascript programmer and I’m having a difficulty that maybe for some is no problem. observe the HTML code well; <tbody> <tr v-for="bancodedado in filteredBancodedaos ">…
-
0
votes0
answers28
viewsError in listing customers who did not make Opencart purchases
I have a problem I can’t solve in any way. I am trying to list only customers who have never made purchases, ie by checking in the order table if there is no purchase associated with the customer…
-
0
votes1
answer303
viewsInstantiate a class that inherits an interface class
I have a class that inherits many interface classes, and I want to instantiate it to use only one method, how do I do? It is possible to do without passing all the necessary parameters? public class…
-
0
votes1
answer1327
viewsNameerror: name 'setSaldo' is not defined
I am learning POO in python and am having a problem. When I try to use the getters and setters I am not getting. #Método Construtor def __init__(self): self.saldo = 0 self.status = False #Métodos…
-
0
votes2
answers138
viewsC# conversion error
I have the most generic class Account and another ContaPoupaça who inherits from that class Conta. In this daughter I have an interface called ITributavel, because this class beyond the methods and…
-
0
votes0
answers50
viewsDate in PHP object orientation?
I’m starting to learn Object Orientation, I’d like to know how to use date with php, because in Java you can import the java util, but in the php I don’t know how to do it, I’ll show you my code:…
-
0
votes0
answers85
viewsSocket connections
I’m trying to do a project where I transfer a file. I’m having trouble accepting the client’s connection. As I am trying to do in different packages the Talya class starts the server connection on…
-
0
votes1
answer89
viewsUsing data from an array of one class in another
How can I use the array palavra_vetor in another class. public class Lista{ String palavras_leitura [] = new String[50]; String palavra_vetor[] = new String [4]; String palavra; public void…
-
0
votes1
answer20
viewsHow to declare abstract methods in OOP interface
I would like to know how to create a method in the interface of a program in object orientation, where this method receives parameters... Example I am creating a remote control object where has the…
-
0
votes1
answer71
viewsOne method taking information from another method
Hello, I would like a help. I’m redoing the object-oriented java workbook from Hidden Object and there came a question that I would like a help. In the booklet you ask to create a simple system of a…
-
0
votes1
answer98
viewsHow to access data from the form in object orientation
How do I receive information coming from POST form, so that these data enter a decision structure, Example: I have an abstract class with the function of entering the system, but in the form the…
-
0
votes1
answer64
viewsError in the Database
I am trying to make every time the user clicks a button happen an UPDATE, but for some reason gives the No database selected, what’s wrong with that code? Update.PHP <?php require_once…
-
0
votes1
answer332
viewsHow do you find out if the list is full?
The method below is to include a book in a list. Returns 1 if the book already exists in the list, 0 if it does not exist in the list and can be inserted and 2 would be for full list. I’m trying to…
-
0
votes1
answer300
viewsJava test cases
I am trying to perform a test on the banking system that I have done, I am using netbeans for this. I need you to test the option to withdraw and deposit, in case what I have done so far only the…