Homework 4

Homework 4 asks you to apply the analysis and design process that was discussed at the end of Lecture 5 (slide 44). To see an example of one iteration of this process, please read the post entitled The Fido Example. It demonstrates the interrelationships that can occur between a requirements list, a use case, an activity diagram and a state diagram. We already saw the sequence diagram that is related to this example back in Lecture 3. This homework is worth 100 points (10 points each for your use cases; 20 points for your activity and sequence diagrams; 20 points for your class diagram; 30 points for your program).

Your assignment is to apply this process to design and implement a program that meets the following requirements:

  • A student learning to play the piano has to master multiple levels of songs that increase in difficulty.
  • Each level of study (Level One, Level Two, etc.) consists of multiple songs that together teach the student an important set of concepts about music and about playing the piano.
  • A student has a name, their current level, and a playlist.
  • A student's playlist consists of all the songs he or she has encountered in his current level plus all of the songs from the prior levels.
  • Each week a student is expected to play his entire playlist.
  • In addition, a student's instructor will assign practice items that must each be played at least five times during the course of the week. Examples of practice items include playing a previously mastered song in a different key or focusing on a particular aspect of a current song. Each practice item can be given an easily remembered name such as “Play Amazing Grace in D” or “Focus on the first eight measures of Canon in D”. Even though a practice item might reference a song on the student's playlist, they are treated as distinct items. Thus, if a student's playlist includes “Canon in D” and one of their practice items contains a reference to that song, they are treated separately: that is, the student will need to play Canon in D at least six times that week (once for the playlist and five times for the practice item).
  • A week begins on Sunday and ends on the subsequent Saturday.
  • An instructor will provide the system with the practice items for a given student for a given week. This list will always be in place before the current week begins. Thus, if the current week is the week of Sept. 18, 2011, then the instructor will have provided the list of practice items for that week by Saturday, Sept. 17, 2011.
  • A student will provide the system with a list of the songs (both playlist and practice items) that they played for a given day.
  • The system uses this information to generate a report that indicates whether the student met their practice obligations for a given week..
  • The system can also combine the weekly reports into a monthly report that details the student's progress for the previous five weeks (i.e. the student's progress over the past month).

In particular, you are asked to create three use cases:

  1. An instructor provides a list of practice items for a student in the system.
  2. A student provides the list of items they practiced for a given day.
  3. An instructor requests that the system generate the monthly report for a particular student.

Use the analysis and design process discussed at the end of Lecture 5 to create a set of UML artifacts that documents a design for a system that implements your three use cases. You need to create three use cases, an activity diagram for the first two use cases, two sequence diagrams that are associated with each of your activity diagrams in some way, and a class diagram that documents the classes and their relationships needed to implement these three use cases. You do not need to generate a state diagrams for this assignment.

Once you have completed the design, implement the program, populate its persistence mechanism with levels, songs, and 2 students (you can assume that the system has only one instructor) and then allow the user of your program to execute each of the use cases listed above. To enable good output for the third use case, you can pre-populate your persistence mechanism with practice data for the students such that there are at least a couple weeks worth of data stored for each student.

Discussion

The format of the report is up to you. It does, however, need to at least list the practice info that it has received from the student (whether that data was pre-populated or entered by the user) and what playlist and practice items were missed by the student for each week (or whether the student met their obligations for a given week). You do not need to provide for functionality that is not related to the three use cases. For instance, your system does not need to provide functionality that allows for the creation of levels and songs, the creation or deletion of students, etc. You also get to choose what user interface you provide for the system. It can be graphical, text only, web based, etc. Finally, I deliberately used the phrase persistence mechanism up above. You can use what ever you want to persist information about students, songs, levels, practice items, and practice information: text files, XML files, sqlite database, etc.

Objectives

The purpose of this assignment again is NOT to just meet the requirements above by any means necessary. Your program should make use of the good object-oriented design principles and patterns that we have discussed in lecture so far. And, your design artifacts (use cases and UML diagrams) should show evidence of actually helping you figure out a design for this system. Do not trivialize the use cases or activity diagrams, let them help you work through your design.

Programming Languages

You may use any object-oriented programming language to write these programs such as Java, C++, C#, Objective-C, ruby or python. If you're contemplating using a langauge other than the ones listed in the previous sentence, then check in with Prof. Anderson before you get too far into your development. For some languages, the grader may have to arrange to meet with you to see your programs in action. If so, he will contact you to set up a meeting.

Logistics

Your submission will be an archive (i.e. a zip archive or compressed tar file) containing the source code for your program and a PDF document that describes your program and its design (via your use cases and UML diagrams) and that provides instructions on how to compile and run your program.

You will send this archive to Prof. Anderson as an attachment to an e-mail message or by uploading the attachment so that it is available on a web server (such as by placing it in the public_html directory of your CSEL account) and then sending Prof. Anderson an e-mail message that contains the URL that will let him download your archive.

In other words, follow the submission guidelines specified on the Assignments page.

Due Dates: Homework 4 is due by 11:59 PM on Monday, October 3, 2011. Any homework submitted after that time but by 11:59 PM on Monday, October 17, 2011 will be graded but will receive a 15% penalty. After that, submissions of Homework 4 will be ignored.

You are strongly encouraged to work on this assignment in a team. If you do, you will submit just one assignment for the entire team; that assignment will list the names of the team members at the top of the first page of the PDF document contained within the archive that you submit.

Any questions?

Send mail to Prof. Anderson


© Kenneth M. Anderson, 2011