codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  File  Camille_83 at 05:45 on Friday, May 19, 2006
 

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;
}
}









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: problem with Exception
•  Re: Turning java class into application
•  Re: this is weird
•  Server Name or Address could not be resolved?
•  Re: How can I read ASCII data file in C++
•  Sending automated emails
•  Re: How to kill framesets
•  What is This?
•  onKeyPress - calling a javascript function , which is showing error.


Recent Articles
What is a pointer in C?
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net


© Copyright codetoad.com 2001-2006