You guys...I need some help... I need to use this file to write a program that will allow me to write or read records of type PetRecord to a file. I need to ask the user if he wants to write or read to a file, and I have to ask for the file name. And I need to redefine the class PetRecord so that is is serializable. Im lost....could any of you give me some 'simple' instructions...I'd surely apreciate it.
In addition to Nigel's advice, I'd also look at tidying up your PetRecord class. In particular, you seem to be following the javabean methodology of getters and setters - as far as your setters are concerned, you should change your the name of your set methods to setXxxxx, where Xxxxx is the name of your class attribute (name, age , weight ). You appear to have quite a bit of repeated code within your class as well. Also, try to keep your constructors together within your class rather than mixing them up with the other methods - it just makes things easier to read.