This site requires JavaScript, please enable it in your browser!
Greenfoot back

Comments for Cute Dogs

Return to Cute Dogs

LoopyLoopy

2012/5/6

Need some help learning how to code. Some definitions are not yet clear to me.
LoopyLoopy

2012/5/6

Next step is for me to move just one of the four dogs.
LoopyLoopy

2012/5/6

Yeah! I did it!!
LoopyLoopy

2012/5/6

Yeah! I did it!!
SPowerSPower

2012/5/6

Your MyDog class has an empty act() method, so put just one of the Dog objects in your world, and the rest must be objects of the class MyDog. If you do that, just one dog will move.
LoopyLoopy

2012/5/6

I did the other way around but I got it to work. Next step: I am to get the dog to greet the other dogs with a dance. I know how to make the dog dance and how to get it to the other dogs. I have not yet been able to get the words that the compiling will accept.
A new version of this scenario was uploaded on Sun May 06 15:07:26 UTC 2012 Need help in learning how to code. Definitions of terms are not clear yet.
LoopyLoopy

2012/5/6

Next step has been done but won't stop doing it. Need to figure out how to shorten the time act is being done.
A new version of this scenario was uploaded on Sun May 06 21:46:38 UTC 2012 Made myDog dance when greeting another dog.
SPowerSPower

2012/5/7

Drag the speed slider :)
LoopyLoopy

2012/5/11

I still have not been able to get myDog to greet another dog an then stop on its own. myDog will dance and then stop when the dance() method is invoked but not when is is brought on by greeting the other dogs. What method should I use to correct this? an if/else statement?
A new version of this scenario was uploaded on Fri May 11 19:42:19 UTC 2012 myDog now stops after it is done greeting dog.
LoopyLoopy

2012/5/11

I still do not understand where to begin to subtract energy from the dog's energy supply.
LoopyLoopy

2012/5/11

How do I know if this works other than it will compile? private int countSteps = 0; { for (int counter = 0; counter < 1; counter++) { countSteps = countSteps + 1; if (countSteps == 30) { energy--; countSteps = 0; } } }
SPowerSPower

2012/5/12

The for loop just does it once: you can remove the for loop. And I don't see the energy instance variable, so it this shouldn't compile.