Questions tagged as 'classes'

2
answers

subtraction of two double properties []

I have a class called funcoes.cs I need to create a property that stores the initial X, Y, and X, Y final values, thought of: public double[] PosicaoInicialXY { get; set; } public double[] PosicaoFinallXY { get; set; } then it...
asked by 24.03.2014 / 21:18
1
answer

How can a class also be a method in Ruby?

See class Integer : Integer.class => Class It also seems like it's a method, at the same time it's a class: Integer 10.5 => 10 How is this possible in Ruby? Where is this method defined? What mechanisms does Ruby use to kno...
asked by 18.11.2018 / 14:14
1
answer

What are pre-specified classes?

Reading the wikipedia publication on POJO (Plain Old Java Objects), I came across the term pre-specified classes. I understood very superficially that perhaps it is the classes of the specification, but it was not very clear. Could you explai...
asked by 21.11.2018 / 17:17
1
answer

JSON return conversion error for JAVA Class

I have a java class public class PRODUTO extends SugarRecord implements Parcelable { private float id_pro; public PRODUTO(float id_pro){ this.id_pro = id_pro; } public float getId_pro() { return id_pro; } public void s...
asked by 16.05.2018 / 07:11
1
answer

Pass variables value between Classes

I would like to pass the values stored in the variables from part1 to part2 to validate the highest value typed. PART 1: public class SEP_06_parte1{ public static void main(String args[]){ System.out.print("Digite 10 valores ");...
asked by 06.10.2014 / 16:40
1
answer

What is the difference between using #include "stack.h" or using the declaration of this class?

Having these two classes, in two different .h files. um.h class um { //(...) }; two.h #include "um.h" //opcao 1 class um; //opcao 2 class dois{ public: void f1(um * p); }; What is the difference between these tw...
asked by 18.01.2017 / 02:56
1
answer

Differences in Constructors Using Property vs. Field

What's the difference between: namespace WMB.CieloB { internal class FuncoesCielo { internal FuncoesCielo(int iDC, Boleto boleto) { IDCliente = iDC; this.boleto = boleto;...
asked by 22.04.2016 / 14:31
1
answer

When my class returns a new modified instance of the class itself instead of modifying itself is this some design pattern?

I'm developing a class that is a collection of values. In it I have several methods that filter the values contained in this collection. My intention is to return a new instance of this same class depending on the modification that a given metho...
asked by 31.03.2016 / 19:37
1
answer

What is the difference between __init__ and __new__?

What is the difference between the special methods __init__ and __new__ in Python?     
asked by 17.01.2017 / 11:51
1
answer

How to create a class with attributes and methods in C ++?

In Java I know how to do it, but in C / C ++ it's little different then how to create a class with C ++ attributes and methods? I'm using CodeBlocks. When I create a class in C ++ it creates two files a .h and another .cpp...
asked by 13.03.2016 / 21:54