Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Java (https://www.askmehelpdesk.com/forumdisplay.php?f=440)
-   -   Java Program (https://www.askmehelpdesk.com/showthread.php?t=731655)

  • Feb 1, 2013, 01:42 AM
    WebI-Novi
    Java Program
    1) Code a java class for an Object SONG, that has as a minimum the following attributes:- SONG Title (a String) , SONG Group/artist (a String ), SONG genre (a String – “Pop”, “Jazz”, “Hard Rock” etc. SONG price (double), SONG duration (int number of seconds). Code all accessor and mutator methods for the SONG class.

    2) Code a GUI program that has the following functionality:-

    Load SONG’s - Create four SONG Objects (the data is hard coded as literals in your program code) and place the SONG objects in an array. Load SONG’s will always create a new array that holds the same four SONGs.

    Display - Display all SONG’s in the array

    Add - Add a new SONG object to the end of the array (prompt for the user to enter all data in order to create the SONG object).

    Save - Save all the SONG’s in the array to the text file. Name this text file SONGDATA.TXT. The data is to be presented as strings in the text file so that it can be displayed. Do NOT place a path on your text file name.

    Exit - Close the GUI and terminate the application
  • Feb 1, 2013, 04:14 AM
    ScottGem
    Thank you for asking our help with your homework assignment. However, there are some rules we have for doing so.
    Do not simply retype or paste a question from your book or study material

    We won't do your homework questions for you. You were given the assignment for you to learn.

    If you come up with your own answer or process and post it for us to critique that is acceptable. If you have some SPECIFIC questions that you couldn't find or didn't understand, we may help with that.
    But this is your assignment, so show us you have at least attempted to complete it on your own.

    Thank you.
  • Feb 1, 2013, 05:58 AM
    WebI-Novi
    Its not an assignment, I am actually going to be part of the Valentines day event where couples are going to be selecting songs based on either the ones on the list or add a new one. I have created a class and my problem was the array of objects.

    What I have above is just an example of four songs.

    The other buttons are done. i.e (Exit, Save, Display) the problem is Load and new, but is now working, its just new.

  • All times are GMT -7. The time now is 03:36 AM.