|
Project #3 |
CMSC 132 |
|
Due Date: Thursday
March
2, 6:00 pm |
Object-Oriented Programming
II |
|
Type of Homework:
Open |
Spring 2006 |
Objective
This homework has several objectives. Those objectives are:
- Learn how to design and develop Graphical User Interfaces (GUI) using
Java.
- Practice Java inner classes.
- Practice using the Java API.
- Get a better understanding of the MVC model by designing the
view/controller associated with an application.
This homework is considered a open homework. Make sure you read the
Open/Closed policy before continuing working on this project.
Unlike other projects, there will be no public/release tests associated with this
project. TAs will examine the GUI functionality manually.
Overview
For this project you will complete the following task:
- Implement a Graphical User Interface (GUI) for the iTunesJr application of
Project #2.
Your project will be graded as follows:
GUI Functionality
70 %
Java Construct Requirements
20 %
Style 10 %
For
this project:
-
Even if you are not planning to work on the project for a while make sure
that:
-
You can compile a simple class using the provided code
distribution. If you have problems compiling a simple class see
your TA immediately.
-
Submit your project using the "Submit Project" option in Eclipse and
verify your submission has been received in the submit server.
It is important that you submit your project using the "Submit Project"
option rather than uploading a jar file to the submit server.
If you are having problems with this submission process, contact your TA or
instructor immediately.
-
You must debug your code using the Eclipse debugger and should not use "System.out.println"
as a debug tool. TAs in office hours will require you to use the
debugger to show any problems you are experiencing.
-
No submit server testing is associated with this project.
-
You do not need to provide an UML diagram for this project, although you are
encouraged to create one for the GUI.
- The code distribution is available by
checking out the project
named p3. The distribution includes:
- A folder named src - In this folder you will find a package
named gui.
- In the gui package you will find the shell for a class named
ItunesJrGUI. This class represents the GUI for the iTunesJr
application.
- ItunesJr.java - This class can be found in the gui package.
It represents the driver that will create
an instance of the MediaManagerSystem class and the one launching the GUI. Make
sure we can run your GUI by executing the main method of this class.
- Make sure you copy the itunesJr package from your Project #2 to
the src directory of Project #3.
Specifications
MediaManagerSystem Class Modifications
You can add/modify your MediaManagerSystem class as you understand is
needed in order to implement the GUI requirements. This implies you
can add methods, instance variables, etc.
Graphical User Interface (GUI)
You must implement your GUI in the gui package. Notice that you don't need to implement a fancy and beautiful
interface in order to get full credit for the GUI. We
have provided a snapshot of a sample GUI just to give you an idea of how
your GUI could look like, but feel free to design your own.
Your GUI must satisfy the following
requirements:
GUI Requirements
- Any classes
associated with the GUI must appear in the gui package.
- You must define and use at least one inner class (not an
anonymous class) in your implementation of the GUI.
- You must define and use at least one one anonymous inner
class in your implementation of the GUI.
- You cannot read user input using System.in.
- You cannot generate results using System.out.
- If you want to provide access to all the functionality associated with
the MediaManagerSystem through the GUI that is fine with us. However,
you are not required to do so. For this project, your GUI should allow us to
complete the following tasks:
- Importing (loading) - Your gui should allow us to load the
contents of a text file containing songs and podcasts.
- New Playlist - Your gui should allow us to create a playlist.
- Selecting a playlist - Your gui should provide a menu entry where
we can select a playlist from a list of playlists. Selecting a
playlist will display the songs associated with that particular playlist.
The list should be displayed using a JTable.
- All songs - Your gui should provide a mechanism to display all
the songs in the system. The list of songs should be displayed using a
JTable.
- Selecting a podcast - Your gui should provide a menu entry where
we can select a podcast from a list of podcasts. Selecting a
particular podcast will display the podcast entries associated with that
particular podcast. The list should be displayed using a JTable.
- Playing a song - Playing a song entry means that we should be
able to click on a song entry, press a play button and then see a message
similar to: "Playing: "<songTitle> where <songTitle> represents the title of
the song. For example, the Sample GUI below illustrates what should be
displayed after selecting a song. In addition to the play button, you
should have a stop button that when pressed changes the message from
"Playing: "<songTitle> to "Playing: None". Notice that no actual audio
playing will take place.
- Playing a podcast entry - We expected a behavior similar to the
one describe for Playing a song.
- Adding a song to playlist - Your gui should provide a mechanism
to add a song to a playlist.
- Exiting the GUI - Your gui should provide an exit option
different from closing the gui window.
- Search - Your gui should allow us to search for songs that
satisfy certain criteria. The result of processing the search should
be displayed using a JTable. The search possibilities are:
- Those songs that belong a specific artist.
- Those songs that belong to a specific genre.
- For songs displayed in a JTable include the following values: Title,
Duration, Artist's name, Album name, Genre, and Description.
- For podcast entries displayed in a JTable include the following
values: Title, Duration, Artist's name, and Description.
- You must use at least the following components: JLabel, JScrollPane, JPanel, JFrame, JTable,
JMenu, JMenuItem, JButton
Style Requirements
- You must avoid code duplication. For example, if several
methods in your class share the same code fragment place that fragment
in a private method.
- You must follow Java conventions for identifiers. For example,
class/interface names must start with capitals.
- You must use meaningful variable names.
- You must indent your code using three or four spaces or by using the
Eclipse "Correct Indentation" option.
- You must use the same style for blocks of curly brackets ({ })
throughout your code.
Honor Section Requirements
In addition to the above requirements you must satisfy the requirements
specified in lecture by your instructor.
Sample GUI
Notice that you don't need to implement a fancy and
beautiful interface in order to get full credit for the GUI component of this
project. Below we have provided a snapshot of a sample GUI just to give you and
idea of how your GUI could look like, but you do not need to implement this particular
GUI. Feel free to design your own.

Submission
Submit your project using the submit project option associated with Eclipse.
Academic Integrity
Please make sure you read the academic integrity section of the syllabus so
you understand what is permissible in our programming projects. We want to
remind you that we check your project against other students' projects and any
case of academic dishonesty will be referred to the
University's Office of
Judicial Program