Results 21 to 26 of 26
- 05-05-2011, 12:32 AM #21
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
I'm wondering why you have to classes which seem to do the same thing.
- 05-05-2011, 01:08 AM #22
Member
- Join Date
- May 2011
- Posts
- 13
- Rep Power
- 0
Thank you Toll, could you elaborate on which string or part that I have not set the rating or number for? I am so confused. But thanks to you I fixed the problem with the number of songs thing.
- 05-05-2011, 01:10 AM #23
Member
- Join Date
- May 2011
- Posts
- 13
- Rep Power
- 0
Which classes are repeated sunde887? And which ones are unnecessary? It's finally coming together!
- 05-05-2011, 01:12 AM #24
From what I understand, your input-loop looks like this now:
I cannot see any call to setSongNumber() in there. As I edited in though, the rating thing has been fixed.PHP Code:for (int count = 0; count < numberOfSongs; count++) { songList[count] = new PlayList(); System.out.print("Who is song #"+(count+1)+" written by? "); inputText = in.nextLine(); songList[count].setArtistName(inputText); System.out.print("What is song #"+(count+1)+"\'s title? "); inputText = in.nextLine(); songList[count].setAlbumTitle(inputText); System.out.print("What is song #"+(count+1)+"\'s album titled? "); inputText = in.nextLine(); songList[count].setSongTitle(inputText); System.out.print("What is song #"+(count+1)+"\'s rating? (From 1 - 5. With 1 being the lowest.) "); inputText = in.nextLine(); songList[count].setSongRating(Integer.parseInt(inputText)); }
- 05-05-2011, 01:23 AM #25
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
The PlayListBuilder and PlayListBuilderArray are basically the same classes. There is one line that seperates them and it's that you get the input for the rating but you don't use it.
- 05-05-2011, 01:26 AM #26
Similar Threads
-
Array code problem
By raladin3d in forum New To JavaReplies: 4Last Post: 04-11-2011, 06:50 AM -
Array Code difficulties
By NixasMuraki in forum New To JavaReplies: 2Last Post: 02-08-2011, 12:17 AM -
code using array
By java008 in forum New To JavaReplies: 11Last Post: 12-18-2008, 10:44 AM -
please i need the code of comparing these two array lists.
By raj reddy in forum JavaServer Pages (JSP) and JSTLReplies: 5Last Post: 04-18-2008, 07:42 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks