Win a copy of Modern frontends with htmx this week in the Spring forum!
  • 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

Address Book entry

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi! I am new member of this forum. And I'm also a beginner of Java Programs. My assignment is to create a class address book that can contain 100 entries of Address Book Entry objects. But i have errors. Please help me to have correct output for my program.


Thank you!
 
Ranch Hand
Posts: 514
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!

This is not bad program as for start.
So what is wrong there?
What do you expect and what do you suffer from?
 
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

Rose Montejo wrote:My assignment is to create a class address book that can contain 100 entries of Address Book Entry objects. But i have errors. Please help me to have correct output for my program.


Hi Rose, and welcome to JavaRanch.

Like Volodymyr, I have no idea what your problem is, because you haven't told us, and ItDoesntWorkIsUseless (←click).

Are you getting compiler errors? Or does it run, but just not do what you want? TellTheDetails.

Oh, and I suggest you EaseUp; lots of exclamation marks don't get your post answered any quicker (in fact, possibly the reverse); so you might want to think about changing your subject line to something a bit calmer.

Winston
 
Ranch Hand
Posts: 172
Python MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well Rose, a quick look at your code tells me the reason why you got the error's. Now here is the best part of the story, Almost all the errors were related to methods that dont exist in your code. So this leads me to wonder, "Are you sure, you have written this code?", because if that is so, then sadly you forgot to write code for methods like "setName(), setAdd(), setPhoneNo(), setEmail(), getInfo(), getInfo2(), getName()"
Do write code for these methods and let us know if you still get any errors.
 
Rose Montejo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh. I'm sorry everyone. I forgot to put what my problem is.

So here it is.
My problem are the line 55-105 & 120.

I tried my best but my best isn't enough.

I need your suggestion folks. Thanks by the way for the people who will help me.
 
Bin Smith
Ranch Hand
Posts: 514
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Ashish Dutt already noticed your problem and advised solution.

However, It would be great to start learning Java with some good book on Java core.
Also do a lot of code on Java core.

 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rose Montejo wrote:
My problem are the line 55-105 & 120.


Then delete them - problem solved!!!

Seriously...

If you want us to help, then you must TellTheDetails. That means - at minimum - Does it compile? Does it run? Does it crash when it does run? Does it give output different than what you expect? What did you expect, and what did it give.

If you have SPECIFIC questions about something, then ask that. You cannot expect anyone here to take their valuable time to look at 120+ lines of code saying you need help with almost half.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic