Questions tagged as 'classes'

1
answer

In what order does a class inherit from its superclasses in python?

Be the code below: class B(A): def __init__(self): self.c = 16 def y(self): print("B.y") def get_c(self): return self.c class C(object): def __init__(self): self.c = 5 def y(self):...
asked by 18.02.2017 / 21:42
1
answer

Vector and Classes, sorting and populating vector in Java

I'm doing an exercise that you need to create a vector of 10 names, and you have 3 methods. The first method is called registerName , and has the function to fill in the vectors, the second method is called sortName that returns a String (whi...
asked by 27.11.2015 / 04:24
1
answer

Access attributes of a vector of objects of another class using C ++ pointers

I'm doing a job for college where I have to set up a program to manage a restaurant that only delivers the orders are made by phone and internet using object orientation and pointers in C ++. I'm doing the following: I use two files for ea...
asked by 19.09.2015 / 19:40
1
answer

C ++ / Arduino Array in class

I have a problem in using an array of pointers, I need to create an array with pointers that refer to an integer value of each object of another class. Example: arrayDePonteiros[0] = objeto.int; In case this array is inside a class and a...
asked by 16.08.2014 / 22:51
2
answers

Doubt in class diagram

Good afternoon. Here's the class diagram question with the diagram I've been able to do. Describe the class diagram for a simple system of reservation and occupation of rooms to a hotel. The system must store reservations made by an employ...
asked by 11.04.2017 / 19:53
2
answers

I believe my error is in arrays, or type conversions, but how to solve?

I'm new to java and I have to do a tetris. In this class in particular, I create 2 control arrays to manage the positions of the pieces on the screen, but it is giving error. Does anyone have some time to help the newbie? package jogo; import...
asked by 08.10.2015 / 02:46
2
answers

Data does not appear on page

I made an OO code in PHP. I used MySQLi for the database and WAMPSERVER as the server, where I inserted data into the "category" table. The bank collation is "latin2_general_ci". There were no errors, but in the browser the data entered did not...
asked by 21.05.2015 / 20:37
1
answer

Class creation in C ++

I'm developing a project and need to create an inner class. Am I required to create a .cpp and .h?     
asked by 16.03.2014 / 15:35
3
answers

What is the difference between var $ var and public $ var?

I have a class: class anyClass{ public $var1; var $var2; } What's the difference between $ var1 and $ var2?     
asked by 13.07.2015 / 06:31
1
answer

Python: How to store the documentation (help) of a class in a String?

I'm doing an explorer explorer of classes in Python. Can I store class methods and attributes with dir(obj) and place them in a TreeView. I would like to display the references of this when clicked. For this I would use the help(obj)...
asked by 13.12.2016 / 23:12