Prepare a java application will read the database file the


The application shall work as follows:

714_GUI_for_Application.png

1. Upon start-up, the application will read the database file. The path of the database file will be supplied by a run-time parameter. If the database file does not exist, the user will be told the database does not exist and prompted (non-GUI text prompt) asking if they want to create a new one. If the user answers positive, the application will continue with an initially empty song database. If the user answers negatively, the application will exit. An example of an appropriate start-up command is as follows: java SongDB mySongDB.data

2. The original state of the frame shall display the combo box with the first song in the database selected. The Item Code, Description, Artist, Album, and Price fields for this item shall be displayed with the fields disabled (non-editable). The Add, Edit, Delete, and Exit buttons shall be enabled, and the Accept and Cancel buttons shall be disabled.

3. To add a song, the user clicks on the Add button. This will cause the application to clear and enable the Item Code, Description, Artist, Album, and Price fields so the user can enter information for the new song. The Edit and Delete buttons are also disabled, and the Accept and Cancel buttons are enabled. When the user presses the Accept button, the new song will be added to the database and combo box. If the user presses the Cancel button, the entry transaction is canceled and the frame reverts to its original state.

4. To edit an existing song, the user shall select the song from the combo box. The information for the selected song shall then be displayed in the disabled fields. The user then presses the Edit button, which enables the Description, Artist, and Price fields. The user may not change the Item Code.

The Add, Edit, and Delete buttons are disabled, and the Accept and Cancel buttons are enabled. If the user presses the Accept button, the changes are saved and the combo box is updated. If the user presses the Cancel button, the edit transaction is canceled and the frame reverts to its original state.

5. To delete an existing song, the user shall select the song from the combo box. The information forthe song shall then be displayed in the disabled fields. If the user presses the Delete button, the song is deleted from the database and the combo box.

6. When the user presses the Exit button the application shall terminate. The current state of the database shall be saved in a file using the pathname supplied at program start-up (see above).

7. Data fields shall be validated to ensure they are not blank with appropriate error messages displayed. If the song is a single, the text "None" will be used for the album name. The price field shall be validated to ensure only numeric data is entered.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Prepare a java application will read the database file the
Reference No:- TGS01186106

Now Priced at $50 (50% Discount)

Recommended (94%)

Rated (4.6/5)

A

Anonymous user

3/25/2016 2:52:43 AM

The task that will follow all guidelines you have to make it on the application shall work as follows: 1. Upon start-up, the application will comprehend the database file. The path of the database file will be supplied via a run-time parameter. If the database file doesn’t survive the user will be told the database doesn’t exist and prompted (non-GUI text prompt) asking if they want to create a new one. If the user answers positive, the application will continue through an initially empty song database. If the user answers negatively, the application will exit. An instance of an appropriate start-up command is as follows: java Song DB mySongDB.data