This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

anyone help me!!!~~~

 
Alex cordes
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • 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 ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
contact the poster here, you may be able to work on it together

http://www.coderanch.com/t/401425/java/java/help-trying-write-program
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
Stuart Ash
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • 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!
 
Scott Selikoff
author
Saloon Keeper
Posts: 4028
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • 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.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15492
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12202
35
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • 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.
 
Jody Brown
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • 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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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~~~
 
Tom Blough
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • 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,
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic