The main part of the program is to calculate average test scores, which I have done here:

import java.util.Scanner; // Needed for the Scanner class

/**
This program demonstrates a user...