Programming Practice: Making Noise

NoiseMaker class

The NoiseMaker class has a constructor that takes no arguments and the following public methods:

The instance methods can be provided with a number specifying how many times a sound repeats.

Problem

Write a complete Java program to have a NoiseMaker object play the sounds:

stomp   stomp   clap   pause   clap  clap   clap   clap

Solution