Yeah, that's good, because then I understand this stuff.Hey. Ill try and help you here so that I put you in the right direction but not give you the full answer right out.
So, I'm not quite sure how to do the parameters. I sort of got the rest, but that confuses me.For that first question you want to create an object and when you create that object you pass it the parameters inside the parenthesis that get sent to the constructor.
Code:
Electron elecOne = new Electron('u' (and from there I don't know quite what to do))
I don't quite understand. So, is the answer no because you would have to create an object to do this?Now for the second question. Is there another method to be able to set the speed or is passing the speed to the constructor via constructing an object the only way? If you can only pass the speed to the constructor then there is no other way and the answer is no.
No. I don't know why I didn't see that.Fourth question. This is a static method. Are you allowed to access non-static variables (xDir) inside a static method?
I have no idea what you said or what to do here.Seventh question. So there are three objects being created. Each making the electronCount go up by one. So then it prints the electronCount variable. How many times did it increase by?
For the last line of code in question seven. is Electron an object that was created? If not, can you call the electronCount method with a non-existant object?