The first one was about the manipulation of images. Like last time's video, it was also quite complicated. What we did was when creating balls, we wanted them to be created like this: they were random sizes, in random colours, and moved at random speeds. To do this, we had to import classes and actions from not the Greenfoot classes, but from the real Java ones. Near the end, we had written quite a long code, and this is what it looked like ( just for the creation of the balls like we wanted them) :
and this is what the actual program looked like when run :
We can see that the balls vary in size and color.
The second video I watched was shorter and like many previous videos talked about the organisation of the code. The photo above is a photo of the code after it was organised. Before that, all the actions from the "setImage" and "Color" classes were all in the first " public Ball" one. Michael helped us to make the code more clear and easier to read by separating those actions into 3 different acting methods.
I am not sure if I have said this before, but especially in these two videos, Michael Kolling has done something that I don't like at all: he teaches us code, and how to write it - and then in the next video, he erases half of it or changes it. I wonder why he does that. Why doesn't he simply teach us the final form in the beginning instead of wasting time and creating lots of videos?
I am happy with my progress. I will start working on my presentation soon and next class I will as usual watch videos.
No comments:
Post a Comment