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 (http://www.georgiasouthern.edu/~bhobbs3/Proj6.java)
That sounds like a job for the cookiemonster!! Hopefully he sees this, he is the residance coding guru.
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.
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 (http://java.sun.com/j2se/1.5.0/docs/api/java/io/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/ (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
yea what he said.... |)