May 23, 2003
Update! Please download new hand-out code. It contains the JukeBox class which was not distributed with the original hand-out code. Please read the discussion board for more information. Thanks!
Purpose: To learn about programming with interfaces, practice reading and understanding more complex code than before, and take a brief look at concepts beyond the scope of CSE 142 – particularly graphical user interfaces.
Procedure: We've prepared a graphical user interface (GUI) and audio rendering code for the jukebox, along with sample play lists and a few audio files. The sample code is complete other than it is missing the crucial JukeBox class which holds everything together. Your task is to read the sample code, integrate it with your own JukeBox class to make it work, write two reports explaining parts of the sample code, and provide code comments for a part of the jukebox GUI.
Turn-in and due date: The due date for part 1 is Wednesday May 28 at 9 pm, and the turn-in for part 1 consists of a report as described below. The due date for part 2 is Tuesday June 3 at 9 pm and the turn-in consists of screenshots, a report as described below, plus your complete jukebox source code with your own comments.
You can complete the entire assignment working in pairs, including both reports – no individual turn-in is required. If you want to hand-draw diagrams to accompany your reports, please explain the diagrams in the text you turn in using the web form, and bring the diagrams to lecture Wednesday June 4.
Apply common sense when deciding how long your reports should be. Too short and you won't be able to convey the material. Too long and the reader will give up.
Grading: Part 1 is worth 4 points for the report. Part 2 is worth a total of 16 points – 8 for the report, 1 for the screenshots, 3 for the code modifications and 4 for the code comments.
This is a difficult assignment and very few of you will be able to complete it perfectly. Your goal should be to do it as well as you can given the time you have. If you know the course material and put care into your solution then you should expect a good grade – even if the solution is not complete.
Time: By Parkinson's Law (1, 2), and as usual, you will sink yourselves entirely into completing this homework. But at least you won't have to debug any loops.
Procedure:
Write a report containing short sections addressing the following questions. Please use file names and line numbers as much as you can when referring to code. Concentrate on JukeBoxInterface.
If you have more time it is a good idea to do the code modifications of part 2 next.
Hints:
Grading:
Your TA will base your grade on how well your report conveys your understanding of Java interfaces and their use in the final jukebox implementation.
Turn-in:
Turn in the report, using the
turn-in
web form for part 1.
First, make the necessary code modifications to integrate your JukeBox class into the sample code. This involves ensuring that your jukebox code correctly implements JukeBoxInterface. You need to get each of the three parts of the GUI (the contents, search and player tabs) to work, and turn in three corresponding screenshots along with the code. Note that you are free to modify any aspect of the sample code as well as your JukeBox class, in any way you please. However, we strongly recommend you attempt to keep your changes minimal, and of course any changes should make things work better...
Second, select one of the three GUI aspects to write a report about. We recommend you select either the contents or the search tab but you can write about the player tab if you want a greater challenge (don't say we didn't warn you though). The report should describe the functionality, design and implementation of the GUI aspect you chose, paying particular attention to the interaction with the jukebox implementation (the five classes from homework 4).
Here are some issues you may wish to discuss in the report, listed in order of decreasing importance:
If you write about the contents or search tab you can assume that the reader already possesses a reasonable understanding of the jukebox code, e.g. all the non-GUI code. The player tab is more difficult to write about because it interacts with the media player class. That class has changed considerably, is now by far the most complex of all the classes of the jukebox and GUI code, and makes use of concepts that are far beyond the scope of 142. However, it is largely irrelevant to the contents and search tabs.
Finally, you need to write comments for the GUI tab you discuss in your report, e.g. one of the files ContentsTab.java, SearchTab.java or PlayerTab.java. Of course it makes most sense to work on this as you prepare the report.
Hints:
Grading:
Your TA will base your report and code comments grades on how well you understand and explain how the sample code works. The clarity of your writing is very important – pay attention to how you structure the report. It helps to use short paragraphs and bulleted or numbered lists for improved legibility.
Turn-in:
Turn in the entire jukebox and GUI implementation, your report and the three screenshots using the web turn-in form for part 2.