Hi there. I'm trying to set a variable(e.g. seatcolor), that I generate in a class generateCar, in an object(e.g. seat) that itself is in another object(e.g. car).
The car object exists in an array with 200 cars. All filled with null.
The seat object has a setSeatColor() method and the car object has a getSeat(). As far as I know getSeat() will return a seat object, but how can I call setSeatColor() when the array exists in another class(e.g. CarList) than the class(generateCar) I'm trying to fill it with?
The plan is to make this thing distributed so I guess that could make it a bit more difficult.
Well I hope I was clear enough with my explanation, if not I'll be happy to answer any question on this thing.
Thanks in advance.
Krolsky
The car object exists in an array with 200 cars. All filled with null.
The seat object has a setSeatColor() method and the car object has a getSeat(). As far as I know getSeat() will return a seat object, but how can I call setSeatColor() when the array exists in another class(e.g. CarList) than the class(generateCar) I'm trying to fill it with?
The plan is to make this thing distributed so I guess that could make it a bit more difficult.
Well I hope I was clear enough with my explanation, if not I'll be happy to answer any question on this thing.
Thanks in advance.
Krolsky