Question: In java please. Need service and client class. Thank you Implement a program that calculates and displays the grade average for a test. The service
In java please. Need service and client class. Thank you
Implement a program that calculates and displays the grade average for a test.
The service class Test should have one instance variable: courseName, secondary constructor, and two business methods: calcAverage and toString.
calcAverage method accepts one varargs parameter grades and calculates the grade average based on the passed content. It returns the calculated average to the caller.
client class should:
- create Test object
- client should not create any array, it should call calcAverage method three times to calculate the average for three tests:
- first call should pass 5 grades,
- second call should pass 11 grades,
- third call should pass 7 grades.
- client should display the result just after receiving the average from the method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
