• 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

anyone help me!!!~~~

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my work topic:
Write a program that functions as a register for a problem class. It should be possible to add and remove names, add and remove class dates, record whether a person was present at a class and display a report of who was present at a selected class. Data should be stored in a file.



and this is my :


IT CONTIANS LOADS ERRORS~~~
CAN ANYONE HELP ME TO CORRECT IT??? EXREMLY URGENT~~~
THANKS A LOT~~~

//JAM -- Edited to add [CODE] and [/CODE] tags.
[ November 16, 2005: Message edited by: Joel McNary ]
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
contact the poster here, you may be able to work on it together

https://coderanch.com/t/401425/java/java/help-trying-write-program
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

First, a bit of business: you may not have read our naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. Joke names and "handles" aren't acceptable. You'll find that many Ranchers won't be interested in helping you until you follow this rule.

You can change your display name
here.
Thanks for your cooperation.
 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ernest Friedman-Hill:
Hi,

Welcome to JavaRanch!

First, a bit of business: you may not have read our naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. Joke names and "handles" aren't acceptable. You'll find that many Ranchers won't be interested in helping you until you follow this rule.

You can change your display name
here.
Thanks for your cooperation.



Do you have a standard template to send out this message? Seems necessary!
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stuart Ash:


Do you have a standard template to send out this message? Seems necessary!



Are you kidding? He sends it out three times a week I'd bet.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, please post code between [code ] ... [/code ] tags, that makes it easier to read.

Second, you say it contains "loads of errors". Take it one step at a time. Start by concentrating on the first error, think why it happens and solve it. Then go to the second error, etc.

We cannot compile your source code because it references classes (KeyboardInput, FileInput, FileOutput) that are not part of the Java API and you didn't supply them.

So, tell us about the errors one by one, what you don't understand, and we can help you with solving them.
[ November 16, 2005: Message edited by: Jesper de Jong ]
 
Stuart Ash
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jesper de Jong:

Second, you say it contains "loads of errors". Take it one step at a time. Start by concentrating on the first error, think why it happens and solve it. Then go to the second error, etc.




But sometimes it might help to run through all the error message and possibly decide which ones to tackle first. The first-come-first-serve approach may not always work. Comments.
 
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
i always start with the first error in the list. Usually, if you fix it, it'll fix/change the others. it would stink to spend an hour on the 4th one, give up and fix the first one, and find that the 4th 'disappeared'.

I suppose there might be cases where solving later bugs would be ok, but i've never enountered one. Certainly never one that is not contrived.
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whatever approach you take, I would certainly recommend that you don't ever try to fix more than one bug at once. That usually leads to either (a) more problems or (b) a lack of understanding as to what change fixed what bug. This is more of a general principle/rule of thumb that I try to stick to at any rate.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Scott Selikoff:


Are you kidding? He sends it out three times a week I'd bet.



Usually at least three times a day is more like it.

Each one of us, I think has our own "version", that we store on our machines and copy and paste it in when we see a violator.

Mark
 
Alex cordes
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when i run my program,errors appear:

"WriteString(java.lang.String) in FileOutput cannot be applied to (java.lang.Object)

this is anothor program's error:

"incompatible types - found java.lang.Object but expected java.lang.String"

i cant get it! anyone help me solve both of them???
thanks a lot~~~
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, I'd get your dispatcher logic working, then test/debug your add entry. Once that is working, use addEntry to build a few test entries. Then test/debug searchForEntry. Once that is working, test/debug removeEntry. Make sure addEntry and searchForEntry still work correctly after removing an entry.

Once those are working, then test/debug your write to file routines. When that is working, you now have a file that you can use to test your load routines.

Break the testing down into small units (Actually you should do the initial coding this way). Don't move on until you have the small section working, then add more functionality.

Two more things to add on list etiquette:

1) All forums are here for other to help with problems. In the future, you'll get more people to read your postings if you use a topic title that refelects what you are lookig for. i.e. "problems coding switch statement"

2) Listers here normally will not do your homework assignments for you. You can go to http://www.rentacoder.com for that. What we will do, is help you to learn by answering well thought out questions to your problems.


Cheers,
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at the JavaDocs for ArrayList.get(int index), paying particular attention to the return type, and think about casting.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic