PROGRAMMING:Find the average score of a classmate
Teachers need to calculate the average score of students in different grades and classes, so they need to write a method in the main class to help teachers find the average score of all courses of a classmate. The first part of the method is: < br / >
public int getAvg(String name, int... scores)
In the main method, this method is used to calculate the average score of two students. The first student has three courses and the second student has four courses. Enter the name of a student and the score of each course respectively, and call getavg method to get the average score and display it.
###Input format:
Enter the name of a student and the score of each course in each line
###Output format:
Each line outputs a student's name and average score
###Input example:
Here is a set of inputs. For example:
```in
tom 78 99 98
mary 88 99 98 97
```
###Output example:
The corresponding output is given here. For example:
```out
tom:91
mary:95
```
answer:If there is no answer, please comment
public int getAvg(String name, int... scores)
In the main method, this method is used to calculate the average score of two students. The first student has three courses and the second student has four courses. Enter the name of a student and the score of each course respectively, and call getavg method to get the average score and display it.
###Input format:
Enter the name of a student and the score of each course in each line
###Output format:
Each line outputs a student's name and average score
###Input example:
Here is a set of inputs. For example:
```in
tom 78 99 98
mary 88 99 98 97
```
###Output example:
The corresponding output is given here. For example:
```out
tom:91
mary:95
```
answer:If there is no answer, please comment