Jan-18-2018, 02:59 PM
(Jan-18-2018, 02:51 PM)Gribouillis Wrote: The message indicates that python cannot compare a 'method' to a string with the comparison operatorThe Error Seems To Have Been resolved With The Code. But there has not been any sorting being done on the contents of the linkedList.>
. A method is a function. You get this because you forgot to call the methodone.getData().getAuthor()
. Note the parentheses.
This Is My Output
Output:After Adding Value At Position 3
3
Author Name: DDD Title: CCC Book ID: 0003
Author Name: AAA Title: BBB Book ID: 0001
Author Name: GGG Title: FFF Book ID: 0004
Author Name: EEE Title: LLL Book ID: 0005
After Sorting
3
Author Name: DDD Title: CCC Book ID: 0003
Author Name: AAA Title: BBB Book ID: 0001
Author Name: GGG Title: FFF Book ID: 0004
Author Name: EEE Title: LLL Book ID: 0005
I am not sure if I have missed out anything inside the code for the BubbleSort().Any Guidance Would Be Appreciated.
Thanks