Java Project
Hi, My name is Francisco, I am new in Java and have this project due this week can someone really help me, I am really struggling with this project. I am using IDE (NETBEANS) for developing this application. I really appreciate if someone can help me. Below is the project requirements.
Thank so much.
This practical work is to write a media management software suite. It stores details of your photos, music and movies (at least these three).
There is a need to standardise three names for software swapping. You should adhere to the following:
* the front end package should be called frontend
* the back end package should be called backend
* the interfaces Storage and Storable to be declared in a separate package called utilities
* the primary class implemented in the back end (the one that implements storage) should be called Database
You should spell these identifiers exactly as above, otherwise your frontend/backend will not swap with other components.
Detail
The project must be written using two separate packages, a front end and a back end. The front end interfaces with the user, takes input requests and returns results. Typical commands would be:
* add/photo
* add/soundTrack
* search all for titles containing "river"
* seacrh all for artist containing "river"
* delete a particvular item.
Each entry in the system should have a title, date of entry and notes. Additionally, music should have an artist, and movies should have a length of movie entry.
The back-end provides the storage, and will simply use a Vector, configured as a Vector<Entry> or similar. This separation of systems in to front and back end (user interface and the database) is a common feature of modern large-scale software.
Interfacing
The front end and the back end will "talk" to each other using an interface. This interface will be standard and is specified here. This interface will be extended during the next week, but will be fixed after the lecture on October 25th.
Classes to be stored in the back-end will implement the Storable interface. It may be a tagging interface, but designers may extend it as required.
interface Storable {
// designers may add requirements here
}
The main back-end class will implement the Storage interface. It must not be modified after the due date for setting it (you will find out why later).
interface Storage {
void add(Storable s);
void delete(Storable s);
void saveDatabase(String s); // saves database to file specified by String
void loadDatabase (String s); // load the database
// iterate through the database
void reset();// reset
boolean hasMore(); // if there is another element available for the next() method
Storable next();// get the next item
}
Input/output
Output (display to the user) should be on-screen using JFrames, JPanels etc. You should mainly write text [g.drawChars("... ], but a bit of colour (a graphic in a separate JPanelto distinguish photos from music etc) is a requirement.
Input should be using the Scanner class.
You can improve the input & output by adding GUI components (buttons, textboxes etc) either by directly using Swing components or by using the Form generator in Netbeans. But if you do this, then it's up to you. In particular, event handling in Java -which you will need to understand if you use the Swing components directly - is fairly complex (but well covered in the tutorial). Note that the full GUI interaction - including event handling - is covered in HIT212.
Options
For small amount of extra marks:
* Input using JOptionPane (see API and tutorial)
* Input using a text box (see Using Text Components in the Java tutorial).
* Using buttons etc (the full GUI)
It will jazz your presentation up, but if you want to avoid a bit of extra research, or are having trouble with the concepts, avoid the last two options. The full GUI is taught in the next subject and - in particular - you will have to understand Java's model for event-handlers and event-listeners. It's all in the tutorial, but will not be discussed in class or tutorials.
Saving the database
Assuming the database is saved as a Vector of Storables, the whole Vector may be saved by defining an ObjectOutputStream:
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("C:/..."));
The Vector (assume it is called store) is then put to disc by the following code:
oos.writeObject(store);
oos.close();
Reading the database back in is as simple. Just define an ObjectInputStream. See the API (ObjectOutputStream, ObjectInputStream) for details.
[Hint: Not all Objects can be written to disc - for security, by default objects cannot be written to disc. If a designer intends objects to be written, they must implement the tagging interface Serializable. Look up Serializable in the API]
Requirements
* Storage must be implemented using a Vector.
* There must be two distinct packages - backend and frontend. These must be implemented as Java packages.
* All classes to be stored must implement the Storable interface (which may be modified)
* The back end must implement the Storage interface (which cannot be modified).
* Group size of one or two. Individuals can identify the code areas they primarily wrote.
*
Marking criteria
The following criteria will be used
* Good coding style, methods short and clear, good variable naming, follows Java naming conventions
* Interfaces used as specified. All front-end/back-end communication enforced through the storage class

