I didn't write it all out since it was clear he didn't understand how to access private variables or for that matter, even create an object from his class. Obviously he didn't understand even how to loop through an array either, but again.... "point you in the right direction..."
Even if you disagreed with how I was helping him, you didn't have to be rude about it. Thanks.
I gave him a partial answer, so he would have enough to figure out the rest... i.e. LEARN instead of just being told the answer...
This assumes that he is incapable of learning from a complete answer. When the answer is trivial, I give it in full. Obviously I don't complete entire multipart homework assignments.
I have had no intention of being rude to anyone here, sorry if you felt that way about one of my posts.