• 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

tracing genealogies

 
Greenhorn
Posts: 18
Netbeans IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I am once again trying to get this piece of code to spit out information.



ok, the problem is it doesn't spit anything out and I am not sure why. Any help would be greatly appreciated
 
Bartender
Posts: 1464
32
Netbeans IDE C++ Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't see any point in your main method that would produce output, other than at Line 236 (where it should print "Enter the filename:" on the console; does it do that much, at least?). After that, it looks like you just read the file, then exit the program.

Also, please don't use capital letters as the first letter of your variable names (Line 229). Do that for class names, instead.
 
lowercase baba
Posts: 13074
67
Chrome Java Linux
  • Likes 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my guess (and I looked at your 200+ lines of code for about 10 seconds) is that you need to flesh out this part a little more:

 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Enos Winder wrote:Ok, I am once again trying to get this piece of code to spit out information.


Once again? Did you include it in another topic somewhere? If so, I can't see it...

Also: In addition to dealing with genealogy, you seem to be rolling your own linked list. Were you asked to do this? Because Java already has a perfectly good one - called, oddly enough, LinkedList (←click).

My advice: Do one thing at a time.

And just one stylistic point: You seem very fond of do...while loops, which are actually quite rare in the real world because:
a. The reader has to skip to the bottom to work out when the loop exits.
b. They can almost always be rewritten as either a while loop (where the exit strategy is at the top), or a more self-contained for loop.

However, there's no 'right' or 'wrong' about this - indeed, I sometimes use them myself to highlight to my reader that the loop is always executed once. But if I do, I rarely put more than two or three lines in the "body", even if it means writing an extra method.

HIH

Winston
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic