Please make sure you are familiar with the resources and policies outlined in the syllabus and the take-home assessments page.

A2 - Guitar Hero

Initial Submission by Thursday 10/14 at 11:59 pm.

Specification Intro Video Submit Code and Reflection

You may submit any part of the assignment as many times as you want before the initial submission. To submit on EdStem, you should use the Mark button to submit your code. You can view your past submissions using the “Submissions” button.

Please make sure you are familiar with the resubmission and late work policy on the syllabus

Developing at Home

You are welcome to use Ed as your environment to work on the homework, but we recommend setting up a local environment following our Desktop Software instructions. This will allow you to work offline, and access the great debugger provided by jGrasp! You can download the code from Ed and when you want to submit, upload it again and then pressing Mark to submit.

Frequently Asked Questions (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 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