• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Circular List

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good afternoon,

I'm working on a program in which I am trying to implement a circular list. Till now I have a MainProgram where I invoke method from the Method class in which I prompt the user to enter details and return this as an object. Then I have created my circular list with methods append and show. I'm appending the object to my circular list and then i will invoke method ListAll() to show all the members of the list.

The problems I have is that i am not sure if the circular list is beign populated... and none members are beiggn shown. I know I surely have some mistakes in CircularList class but i'm stuck and cannot identify my mistakes.

Below follows my code. Thanks

import java.util.*;



import java.util.*;




 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Take out a pencil and paper, and walk through what your append method is doing. You will see that it doesn't do it correctly.

Henry
 
Ronald Spina
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks henry .. i have revised method append and adjusted as follows

However it is still not working.
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ronald Spina wrote:Thanks henry .. i have revised method append and adjusted as follows

However it is still not working.



Go back to pen and paper (and walk through the methiod) again. You will see why.

Henry
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic