Questions tagged as 'classes'

1
answer

I did not understand how the value (self) in "city.status = self" inside the function add_city ()

class Estado: def __init__(self, nome, sigla): self.nome = nome self.sigla = sigla self.cidades = [] def adiciona_cidade(self, cidade): #essa linha abaixo que eu não entendi o que significa cidade...
asked by 11.01.2018 / 19:49
1
answer

Namespace does not work in php 5.5

I'm doing a simple system using php with mvc structure and I want to use the namespace, however, of the error stating that it does not find the Data class. Error: Fatal error: Class 'Config \ Database \ Data' not found in /home/andre/www/mvc-...
asked by 16.12.2017 / 20:14
1
answer

Override static method

I do not know how to ask the question, but I'll try. I have a static method in a parent class, and I planned to overwrite it in the child classes, but from what I'm seeing here, that's not possible. I remembered a feature that has in Java, wh...
asked by 04.12.2017 / 13:03
1
answer

Eclipse Debug Configuration

Good afternoon. I have a problem debugging my project in Eclipse. Native classes of java are appearing in the debugging process when the only classes that interest me are those that are part of my project. How do I choose not to view native J...
asked by 04.09.2017 / 21:19
1
answer

Class polynomial - list assignment index out of range

I'm not sure how to do this, but I'm not sure how to do this.    File "/home/leticia/Documentos/python/Poo/polinomio.py", line 30, in          p3 = p1 + p2 File "/home/leticia/Documentos/python/Poo/polinomio.py", line 19, in    add       ind...
asked by 31.08.2017 / 18:44
1
answer

Questions about classes and methods in Python

I have a question, I can not do an exercise in classes and methods.    2 - Create the "Date" class with the attributes: day, month, and year. And create the methods "setarData (receive day, month and year)" and "print (" ex: 03/08/2017 ")". T...
asked by 04.08.2017 / 01:05
1
answer

Error compiling C ++ source code together with header file and member function file

Hello, I would like some help with this exercise code. This is my first time trying to get a doubt here. When I try to compile the file with the GridBook.cpp member functions or the file containing the main function (_fig03_17.cpp_) is retu...
asked by 07.08.2017 / 21:28
1
answer

Change background of a section [closed]

the section has a defined background How do I move the mouse over the image? 1 Change the background of the section overlapping the current one, remove the mouse back. <section class="modules"> <div class="container"> <...
asked by 21.06.2017 / 21:38
1
answer

Is it a good choice to start a project with Diagram Use Cases, then Class Diagram?

I have a software idea, but I do not know if I should go directly to the class diagram and then the encoding or if I should first use a use-case diagram. I will work on this software alone. It is a long-term dream that I will make in my spare ti...
asked by 13.06.2017 / 04:35
1
answer

How to add an external variable in class php

Hello everyone, I am creating a class for user data and I would like to know how to insert an external variable containing data, for example from the database: class Usuario { public $nomecompleto; } $DadosUsuaio = new Usuario; $DadosUs...
asked by 18.06.2017 / 20:51