GuitarString
and try to implement that completely before starting on Guitar37
. While the reason GuitarString
works based on physics of sound, you don't need to actually understand it. In the GuitarString
section of the spec, it exactly describes how to implement the code, which you should follow to get a working implementation.
Guitar37
into the test37 folder and run Test37
java from there. You should not modify or use the other files from the test directory since they are all testing related.
Warning: You should be careful when copying your homework files. Now you will have two files on your computer called Guitar37
and you want to make sure you are editting the right one (outside of test37) when you are making fixes to your code.
It is difficult in commenting the GuitarString class to know what constitutes an implementation detail and what is okay to discuss in client comments. Assume that a client of the GuitarString class is familiar with the concept of a ring buffer and the Karplus-Strong algorithm. The fact that we are implementing it as a queue is an implementation detail. So do not mention how you implement the ring buffer. But you can discuss the ring buffer itself and the changes that your methods make to the state of the ring buffer (e.g., moving values from the front to the back of the ring buffer).