Ask Experts Questions for FREE Help !
Ask
    WebI-Novi's Avatar
    WebI-Novi Posts: 2, Reputation: 1
    New Member
     
    #1

    Feb 1, 2013, 01:42 AM
    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
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    Feb 1, 2013, 04:14 AM
    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.
    WebI-Novi's Avatar
    WebI-Novi Posts: 2, Reputation: 1
    New Member
     
    #3

    Feb 1, 2013, 05:58 AM
    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.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Goback n protocol java program [ 3 Answers ]

The Reliable Lab Introduction Computer systems (such as computer networks) are often too complex to analyze formally. Performing measurements in such systems can also be impossible due to practical reasons. It is therefore common that they are evaluated by simulation. In this lab, you will...

Postfix program in java [ 0 Answers ]

Java program? [ 2 Answers ]

we have an assignment! but hold up! I would only ask what is the name of this code if I have fill up the blanks! code: puclic class problim{ public static void main(Stringarg){ int x=___; int y=___; while;(__<s){ x=____;

Java program error [ 1 Answers ]

Sir, program is for managing account details using jdbc but ,there error like some variable not accessible in specefic block . Please solve this problem. If you can.. //mypanel1-LogIn class mypanel1 extends JPanel { JTextField t1,t2; JButton b1,b2; mypanel1() { JLabel l1,l2; ...


View more questions Search