Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java List Implementation  RSS feed

 
Claire Danvers
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am required to write an ordedLinkedList class and UnOrderedArrayList class and a Student class. I have attached a zip file containing all my classes, interfaces, and methods. I can't seem to get any of my toString methods correct my output is messed up. I can't get the program to output the student name and then GPA. I am supposed to "test every method in both ordedLinkedList and UnOrderedArrayList classes on managing the student data type." I can't figure out where I'm going wrong or what I should change. I attached my output code in a picture as well.

[/code]













//Main Method For Testing



Screen-Shot-2016-04-11-at-12.32.42-PM.png
[Thumbnail for Screen-Shot-2016-04-11-at-12.32.42-PM.png]
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see where you override toString in your orderedLinkedList and unOrderedArrayList classes
 
Claire Danvers
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't know if the toString should be in those methods or in the ArrayList/LinkedList?
 
Campbell Ritchie
Marshal
Posts: 55751
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!