This is similar to programming challenge 10, from our book (page 107).
For this assignment you are going to write the code for the following class:
Here are the specifications of class TestAverage:
TestAverage has three INSTANCE variables: test1, test2, and test3. They are doubles.
You must declare the three instance variables as doubles. For example:
Methods of class TestAverage:
what it does: it asks the user to enter three test scores (the values should be doubles)
what it does: it displays each test score, as well as the average of the scores.
HINTS: remember to import java.util.Scanner at the beginning:
Example of input/output:
please enter value for test1: 9
please enter value for test2: 10
please enter value for test3: 11
please enter value for test1: 3.1
please enter value for test2: 3.3
please enter value for test3: 5.1
Read the instructions carefully:create a folder called Assignment061
- create a file called Star.java and save it in folder Assignment061
- download file TTest061.class.zip (TTest061_java6.class.zip) and put it in your folder Assignment061
- compile all java files in folder Assignment061
- type the following command in the DOS prompt window:
- tests will be run on your code and appropriate messages will be printed out showing which tests passed and which failed. At the end the program will tell you which option to choose in the moodle quizz corresponding to programming exercise 061
- You must use Test061.print of Test061.println instead of System.out.print and System.out.println or else your code will not pass the tests.