• Post Reply Bookmark Topic Watch Topic
  • New Topic

list all items from a seperate class  RSS feed

 
kennith stomps
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I am needing to figure out how I would go about listing all items, for option 3 in my menu, anyone have any clue?


here is mediaitem class



here is library class

 
Paul Clapham
Sheriff
Posts: 22828
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you're halfway there.



You've correctly understood that you need to ask the Library object to list the items. So, all you have to do is to add the listAllItems() method to the Library class.

I don't understand what the second line of code is for, though. I don't think you need that.

However, you do need a statement at the end of each "case", otherwise control will just fall through from case 1 to case 2 and onwards to case 3.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!