News:

Why yes, yes it is still online!
-Balaso

I need some help.....*prays to the God of Java*

Started by crypticknight, April 25, 2006, 08:43:57 AM

Previous topic - Next topic

crypticknight

April 25, 2006, 08:43:57 AM Last Edit: April 25, 2006, 08:44:12 AM by crypticknight
ok so heres the thing i have my final project in advanced java due thursday....we just got it today.
-------------------------------------
Directions:

traveloutput file:
  modify project 6 so that the data captured is placed in "travel.dat" data file.
  capture at least 5 records

travel input file:
 create a small program that opens the "travel.dat" file and reads the data file to a JOptionPane dialog box in summary format using toString() method.

You may send the data to the file using either a "plain text" format or "serialization/object" format.
--------------------------------------

Now with that said, the teacher said it was only like 10 lines of code or so to add....but i have no idea how to do it.

Posted below is the source.....if anyone could help i would be extremely greatful.
http://www.georgiasouthern.edu/~bhobbs3/Proj6.java

Balaso

That sounds like a job for the cookiemonster!! Hopefully he sees this, he is the residance coding guru.
MURPHEY'S LAW: Anything that can go wr...+\#&\% Bus Error -- Core Dumped

sK_Cookie

cryptic yes this realtively easy.  Not sure what you code looks like but you need to make your class serialized and implement outputstringbuffer.  I will tell you that there is alot of info in the API docs with examples for this one.  Look at the fileoutputstream and serialized string buffer.  There is something else im forgetting here.  Give me a few and I will look up the exact names for you with links to the info in api docs on java.sun.com website.

sK_Cookie

okay found it this is exactly what you need and all the docs you should need on it

http://java.sun.com/j2se/1.5.0/docs/api/ja...FileReader.html

The class you will call is filereader to read the characters in the flat file.

just in cass you dont have this link this is to the main docs in case you need further info inorder to make it work with in the program you already have.

http://java.sun.com/j2se/1.5.0/docs/api/

if there is anything else I can help you with let me know.  I dont know if I will be able to get back on the forums tonight but you can call me I pmed you the number

E.J.FUDD

yea though i walk through the valley of death i shall fear no evil for i tread upon the bones of its forefathers