using variables from other classes in arrays :/
So i already have this array in a TransmitterTest class:
network = new Transmitter[networkSize] ;
Transmitter is another class, with x y and radius variables.
There's a few methods in it like getX, getY and getRadius that just return their values.
The TransmitterTest class creates random values for the x and y variables, and there's a set value for radius, then they added to the network array as a Transmitter :
network[i] = new Transmitter(x, y, radius) ;
that all works so far.
but i dont know how to use these values later on though in another method :/
assumed would be something like
for value of x of Transmitter in i position of array, but cant get it to work.
Re: using variables from other classes in arrays :/
Through the array, you would directly access the values of the object, in this case I suspect it would be something like:
But that's a guess without full code