Start: Tuesday 11/18; Due: Wednesday 12/3, by the beginning of class
Project 6: Guitar Hero
Overview
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.
Getting started
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.
Required structure
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:
- The name of the Java project should be "Project6".
-
You should write the three classes "RingBuffer", "GuitarString", and "GuitarHero" described in
Plucking a Guitar String. The first two should satisfy the API specifications
given in Plucking a Guitar String (with the exact same names and signatures). Some of the API specifications include situations where an exception should be thrown; I suggest an
IllegalStateException
would be appropriate. In writing theRingBuffer
class, I suggest you use a somewhat different internal design. Rather than keeping track offirst
andlast
, keep track offirst
and thesize
. This is much easier to get right, particularly for the cases where the buffer is empty or full. When thesize
is 0, thefirst
can be any index within the legal bounds of the array. - You should create a "documents" folder in Project6 where you will put a readme.txt file described in the "What you must do/hand in" section below.
- You should create a "lib" folder in Project6, put stdlib.jar into it, and put stdlib.jar into the build path for the project.
- Your final program should function as described in Plucking a Guitar String.
- You must test the classes RingBuffer and GuitarString in isolation. The gradesheet assumes you will do this by putting a main method for testing in each of these classes. Alternatively, you could use JUnit if you know about it or want to ask for a tutorial.
What you must do/hand in
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 credit opportunities
Extra credits 1 and 2 given in Plucking a Guitar String.
Gradesheet
We will use this gradesheet when grading your lab.
Submission
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 f-mcs-178-003, which is the lab section.