This assignment is also taken from the projects on the book's web site. In this case, the assignment is the Plucking a Guitar String (a.k.a. Guitar Hero). Be sure to read my comments below for some clarification and suggestions.
You should work on this project individually.
You should read through the lab Plucking a Guitar String. As they say at the beginning of that page, you should probably review the material in the textbook on digital audio (pages 147-151 and 202-206) beforehand.
Instead of giving you a template Java file to work from, we are going to have you create the code more or less from scratch. However, in order to enforce some uniformity (which will make the grading easier), we request that you do certain things:
IllegalStateException
would be appropriate. In writing the RingBuffer
class, I suggest you use a somewhat different internal design. Rather than keeping track of first
and last
, keep track of first
and the size
. This is much easier to get right, particularly for the cases where the buffer is empty or full. When the size
is 0, the first
can be any index within the legal bounds of the array.Your program contain at least the methods given above and should meet the specifications give in Plucking a Guitar String. You should also fill out the following readme.txt file ad include it in the documents folder.
We will expect the components to be adequately tested. In particular, both of the classes "RingBuffer" and "GuitarString" should be tested in isolation.
Extra credits 1 and 2 given in Plucking a Guitar String.
We will use this gradesheet when grading your lab.
Use the same procedure to submit your code as in the previous project. Submit the zip file via Moodle. This is described in our step by step instruction on submitting code. Be sure to select 2016 s-mcs-178-001, which is your lecture section.