I'm writing a Java sample program for demonstrating interpretor design Pattern.
Can you please tell me how should i go about writing the "Note class and the Frequency class" for the above example.
How should i invoke the above class from my main method.I'm finding it difficult to proceed.
Need your help ??
Help provided will be appreciated.
When The Going Gets Tougher,The Tougher gets Going
Joined: Jul 11, 2001
Where do you see the Interpreter design pattern in this example?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
This is an example of Interpretor design pattern.
The musical notes along with their frequencies is stored in the properties file.
By passing a Note,a corresponding frequency is retrieved and based on the frequency a corresponding sound is produced.