The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Tried to write some of it

Posted by Joe on December 16, 2001 at 12:50 PM

> 1. Define a java class called student. Each student has a name, a count of taken exams, and an average grade in those exams. At the beginning of the semester, we start with a count of 0 exams & an average of 0.

> The class should have 3 methods, plus of the constructor:
> � GetName : To simply return the student�s name
> � GetAverage: To return the student�s average grade so far
> AddTest: to add a new test score to the student�s record.

aight i tried to write the method skeleton but im not sure what this program is exactly asking me to write..this is what i got so far can you tell me if im the right track and what else i need please...

public class student
public String getName(String Name)
string Name=N;
return N;
public double getAverage(Double Average)
double Average=A;
return A;
public double addTest(Double Test)
double Test = T;
return T;


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us