Homework 2 (GuitarHero) FAQ

Q: I have no idea how any of this sound stuff works, how can I even start this assignment?
A: You do not need to understand the physics of sound in order to do this assignment! You should start with 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.
Q: How do I run test 37?
A: Copy your 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.

Q: How do I generate a random number?
A: You should use a Random object or Math.random(). If you are not familiar with generating random numbers, please review the textbook.
Q: Can I assume the client knows what the ring buffer is?
A: This is answered in the spec. A helpful paragraph might be:
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. The fact that we are implementing it as a queue is an implementation detail. So don't 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). You may also assume that the client is familiar with the Karplus-Strong algorithm.