Java assignment

Will like to know if anyone can assist me with this assignment. I just started the class, and i need help in completing this assignment.

Assignment:

The first programming project involves writing a program that determines whether a file of student records is in sorted order or not. This program should consist of two classes.

The first class should contain a main method that prompts the user for the name of the input file. If the input file cannot be opened, the method should continue to reprompt the user for the correct name, until the file can be opened. The file should be read, and the method should verify that the file is in ascending order. If it is not, an appropriate error message should be displayed, and the program should terminate. As the student records are read in, they should be displayed on the screen.

The second class should be named Student and should implement the predefined interface Comparable. Its instance variables should include first name, last name, an integer number of credits completed, and a floating-point grade-point average. This class should contain the following methods:

? A method input that reads in a student record from a file. All the data fields will be separated by at least one space. The order of the fields is first name, last name, credits, and grade point.

? A method output that writes out a student record to the screen. The name should be output last name first, separating the last and first names with a comma.

? A method compareTo that compares two student records. The names only are compared. The last name is more significant than the first. The method returns a ?1 if the first name is less than the second, a 0 if they are equal, and a 1 if the first name is greater than the second.

? A method equals that compares two students. Only the names are compared as with the compareTo method.

A general rule of thumb around here is that we do not do your homework for you. If you're just starting out, then I recommend reading your assigned textbook. If you can't own a textbook, then I suggest you read Sun's tutorials. Otherwise, if you have at least some clue as to how to program- everything you need to do is in your assignment description, so what exactly is the problem? Your description even goes so far as to tell you the names of methods, names of the class, the interface it may implement and what parameters methods take and what they output. Every step is outlined for you.

You need to make an attempt at your work before you get help - Help yourself before we help you.

Considering you're new to the forum you may not have realized this isn't a do-your-homework-for-you-site, regardless you have not started off on the right foot. Read the FAQ before you post again.

Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice? Vote now!
Got a little Capt'n in you? (drink responsibly)