|
Can anyone please help me to write this program, am new to programming & am having a hard time with this... anyone?
Here is what i am trying to do:
Using the student record below, i am trying to write a program that allows me to input student records and creates an output file using object serialization. Then i have to write another program that reads the file created by the first program and displays, to the screen or in a GUI,each student’s ID, name and letter grade. Use the following scale to determine the letter
grade:
A 90-100%
B 80-89%
C 70-79%
D 60-69%
F Below 60%
//
package studentRecord;
import java.io.Serializable;
public class StudentRecord implements Serializable{
private int ID;
private String firstName;
private String lastName;
private double score;
public StudentRecord()
{
this( 0, "", "", 0.0 );
}
public StudentRecord(
int id, String first, String last, double s )
{
setID( id );
setFirstName( first );
setLastName( last );
setScore( s );
}
public void setID( int id )
{
ID = id;
}
public int getID()
{
return ID;
}
public void setFirstName( String first )
{
firstName = first;
}
public String getFirstName()
{
return firstName;
}
public void setLastName( String last )
{
lastName = last;
}
public String getLastName()
{
return lastName;
}
public void setScore( double s )
{
score = s;
}
public double getScore()
{
return score;
}
}
|
|
|
|
|
|
|
|