IDNLearn.com: Your trusted platform for finding reliable answers. Discover detailed answers to your questions with our extensive database of expert knowledge.
Sagot :
Answer:
Answered below
Explanation:
class TestScores {
double test1;
double test2;
double test 3;
public TestScores (double test1, double test2, double teat3){
this.test1= test1;
this.test2 = test2;
this.test3 = teat3;}
//mutator
public setTest1(double test1){
this.test1 = test1;
}
//accessor
public double getTest1(){
return test 1;
}
//Write same accessors and mutators for test2 and test3
public double getTestAverage(){
double sum = test1+test2+test3;
return sum / 3;
}
}
class TestRun{
public static void main (String [] args){
TestScores scores = new TestScores(50.5, 40.0, 80.7)
int average = scores.getTestAverage();
System.out.print(average);
}
We appreciate your presence here. Keep sharing knowledge and helping others find the answers they need. This community is the perfect place to learn together. Your questions deserve reliable answers. Thanks for visiting IDNLearn.com, and see you again soon for more helpful information.