Thursday, May 5, 2011

D-9

Sometimes, I hate Greenfoot because there are many ways you can write a code and have the same results. 
For example, writing a code to make sounds when you press a keyboard. 


AND GUESS WHAT 
I FIGURED OUT SOMETHING TOTALLY COOL. 
AND MOST-KNOW-FACT FOR DOING THE PIANO CHAPTER 


AND IT IS......!!!!


THE KEY CLASS AND THE PIANO CLASS ARE DIFFERENT!
THE PIANO CLASS USES THE KEY CLASS! 


ahhhhhhhhh


hahha
those are my surprise faces.
SO yeah
okay
so I went to the piano class and added


        addObject ( new Key ("g", "3a.wav"), 300, 180);

which made a 'a' sound when the g key was pressed.


now, the book told me a new method called
with loop 
it sounds cool.
what the loop thing does is that they do a similar task repeatedly
I then learned the local variable

I want to know what
 super(800, 340, 1);
this statement means.
WHAT DOES YOU MEAN
:P


No comments:

Post a Comment