hello i need to create this thing its for my home work and i have no time to do it because i am taking 6 college classes and when i tried to do it i had no idea so i reread the chapter which it was suppose to be on 6 times and the chapter was like 70 pages and i still didn't get it so can some one please help me out and thank you very much.

Create an interface with the motif look and feel that allows the user to enter and record trips taken and store them in a data file on a floppy disk. Fields should include:

* Trip date
* Start destination
* Ending destination
* Mileage
* Cost

I would suggest creating a class with attributes the ones you have described in your post:

Trip date (Date)
Start destination (String)
Ending destination (String)
Mileage (double)
Cost (double)

Then create in another class methods for writing and reading files the above information taken from the classes. (The floppy disk is just another file. Instead of typing C:/somefile... you can type A:/somefile... so don't let this write to floppy scare you)

Yes as javaaddict suggested create a class may be name it Travel which has the following fields

class Travel {
String destination;

};

because i am taking 6 college

I'm taking 7 and working 40 hours a week, yet I manage to get my work done despite moving houses over the passed two weeks. You'll need a better excuse to make us do your homework.

So, what specifically are you having trouble understandng?

Yes as javaaddict suggested create a class may be name it Travel which has the following fields

class Travel {
String destination;

};

Without the semi-colon at the end of he brackets.

Comments
Nicely spoted...
This article has been dead for over six months. Start a new discussion instead.