import java.util.Scanner;
import javax.swing.JOptionPane;
public class TestAverage
{
public static void main(String []args)
{
double score1;
double score2;
double score3;
double score123;
double scoreAvg;
//create a scanner object to read input 1
Scanner keyboard1 = new Scanner(System.in);
//get test score 1
System.out.println(“First test score:”);
score1 = keyboard1.nextDouble();
//create a scanner object to read input 2
Scanner keyboard2 = new Scanner(System.in);
//get test score 2
System.out.println(“Second test score:”);
score2 = keyboard2.nextDouble();
//create a scanner object to read input 3
Scanner keyboard3 = new Scanner(System.in);
//get test score 3
System.out.prinln(“Third test score:”);
score3 = keyboard3.nextDouble();
//display the three test scores
System.out.println(“First test score: ” + score1 + “%”);
System.out.println(“Second test score: ” + score2 + “%”);
System.out.println(“Third test score: ” + score3 + “%”);
//add three scores together and then divide by 3
score123 = score1 + score2 + score3;
scoreAvg = score123 / 3;
//display test score average
System.out.println(“Test score average: ” + scoreAvg + “%”);
}