I am trying to extend the piano project in the Greenfoot book. I have a Key class method that plays a specific note depending on the key pressed. The Key class method also adds an object for a different class (called Note) when the key is pressed. To do this it calls a method from the World subclass (Piano). Currently, the same object image is added whatever the key pressed. Is there a way of specifying which image will be added when the Key class method adds a Note class object?
Many thanks in advance. This forum is very helpful towards, and patient with, beginners like me.