Program #1 FAQ
-
What features does the application need to provide?
Highest Need
-
Create a new playlist
-
Add a song to a playlist
-
List all the songs in a playlist
-
Remove a song from a playlist
-
Compute the total time of all songs on the playlist
Very Desirable
-
Sort the playlist by author or title (first name)
Moderate Need
-
Display a directory of available playlists
-
Select (open) a playlist
Lowest Need
-
Change the position of a song in the list
-
Display time in mm:ss format
-
What engineering tradeoffs should I consider?
The user wants an inexpensive product delivered quickly. The
user is willing to sacrifice some convenience in usability in order to
keep the cost down. (Hint: don't use a GUI unless you are fluent
with the needed tools). However, do not design a UI that requires
the user to answer a series of interactive questions. Such an interface
is not of professional quality.
You may not have time to implement all the desired features, so prioritize
your efforts to produce the highest need features first.
-
What platform does the application have to run on?
You may use any development language / platform you desire, but you
must be able to demonstrate your solution on one of the platforms available
in the CSc labs: Windows, Solaris, Linux, or the Web.
-
What data structures should I use?
It's up to you. Vector, List and Tree are all possible choices but
it depends on the class library you choose. Also, performance requirements
drive the data structure choice.
-
Does the user care about external file formats?
Not really but he wants an inexpensive solution, and designing your
own format may be costly. The best solution is to use a serializable collection
class but other simple solutions are also acceptable. Don't even think
of designing your own binary format. It is recommended to not use
text files for persistent storage; it's a lot of tedious work and will
probably take more time to develop than serialization.
-
Do you have an example of serialization?
Check out:
Write
File
Read
File
-
What about sorting? We need to sort entries for printing?
The instructor insists that you not use a O(n2) sort!
Do not write any sorting code. Instead:
a. Use a collection class (e.g. TreeSet in Java)
that sorts for you OR
b. Use Collections.sort
OR
c. Use a sort function from a library (e.g. man
3 qsort in Unix) OR
d. Use a command line sort (both DOS and Unix have
them)
-
What, specifically, constitutes unacceptable code?
After program 1, all code must meet the class coding
standards. On the first program, these standards will not be
enforced rigorously, but this is a good chance to get in the habit of following
the class standards. As a minimum,
-
have an overview in each file.
-
have specifications for each method.
-
use meaningful variable names and have comments where code isn't clear.
-
be nicely formatted (dark print, no wrap-around, use blank lines for layout,
...)
-
have NO magic numbers.
-
What quality level do you expect?
Demo quality, as defined by Dr. Stearns Quality
Level Guidelines
-
May I use command line arguments for the input?
Yes.
-
What about test cases?
The bare minimum is to verify all of the required features.
Be sure to run at least two program sessions to verify that you can
create a playlist, save it on disk and then read it in.
-
What are some of the use cases we don't need to implement?
-
Edit artist or title
-
Display playlist sorted by song duration
-
Play the song if it exists in MP3 format