Results 1 to 4 of 4
Thread: Sum of GPA
- 03-30-2011, 07:05 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 44
- Rep Power
- 0
Sum of GPA
Instruction:
Write StudentStatisticCalculator.java
An interface with two methods:
getName(), which returns a String
computeStatistic(Student[] students), which returns a double
You'll write 4 classes that implement the StudentStatisticCacluator interface,
to find the sum, min, max, and average gpa in the student array passed to printStatistic.
public interface StudentStatisticCalculator{
public String getName();
public double computeStatistic(Student[] students);
}
public class SumGpa implements StudentStatisticCalculator {
String name;
public SumGpa(){
}
public String getName(){
return name;
}
public double computeStatistic(Student[] students){
return 1;
}
public static void main(String args[]){
SumGpa s=new SumGpa();
}
}
I was wondering if I am missing something, and I would like to know what would i have to do to get the sum of the gpa.
- 03-30-2011, 07:24 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
Why did you make this new thread for the same basic question?
- 03-30-2011, 07:33 AM #3
Member
- Join Date
- Mar 2011
- Posts
- 44
- Rep Power
- 0
i guess it was a different question now.
- 03-30-2011, 07:34 AM #4
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks