Okay so I am working on a project and it's essentially a simplified Super Mario Bros. (based on the Pengu scenario) and I am trying to do the following:
1) I have a Question Block in the world and it's supposed to be one of those blocks with lots of coins in it. I am trying to add collision detection so that when Mario's head (yes, I know it's really his fist but this is simplified for my project) hits the block, it adds 1 to my Coin Counter.
also
2) I am trying to add sounds for when Mario jumps, hits the block, acquires coins, and also the music that will be constantly playing in the background. All of the sounds are in my sounds folder. I just am not sure how to get them to play.
I am unsure of how to do these things. I am pretty sure I can make it where if Mario makes contact with the block, a sound will play, but I would like for there to be the sort of "bounce" back like in Breakout. I know if I was ending the game, I would code the following:
public void gameOver()
{
Greenfoot.playSound("gameover.wav");
Greenfoot.stop();
}
Any tips?

