That is putting the cart before the horse. You need to work out what you are going to do before you try to work out how to do it. The names of variables don't enter the equation until you start implementing something.
lilly Rankine wrote:. . . where I would put the 'each experiment numberOfExperiments' variable part. . . .
lilly Rankine wrote:no I am totally lost. So if anyone can guide me or get me started great
lilly Rankine wrote:But it needs to start like this:
public void runExperiments()
lilly Rankine wrote:What do I write in place of the placholder code?
Liutauras Vilda wrote:Why SpaceRocket constructor does not accept as the parameters powerLevel (this one maybe could be avoided) and maxPowerLevel? And the opposite question, why numberOfExperiments is part of constructor parameters list? numberOfExperiments I'd more expect to be part of runExperiments() method.
I wrote:That is, if the car stops after having only used up 1 unit of gas, it will only be topped off with 1 unit instead of 2 units. If it has used 3 units of gas, the full 2 units allowed per stop will be used but it won't be able to add more until the next time it stops.
Junilu Lacar wrote:Should we pass a value to the runRace() method to tell it how many laps to run? Or should that be passed to the constructor? I'm going to opt for the former since it makes more sense to me.
Liutauras Vilda wrote:...why numberOfExperiments is part of constructor parameters list? numberOfExperiments I'd more expect to be part of runExperiments() method.
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton