Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

TestScores Class

sj07uk80
sj07uk80 


Design a TestScores class that has fields to hold an ID and three test scores. The class should have a constructor, accessor and mutator methods for the test score fields, and a method that returns the average of the test scores. Demonstrate the class by writing a separate program that creates three instances of the class. Then the program should display the average of the scores, as shown in the following table: ID Test1 Test2 Test3 Average 34557 70 90 66 75.33 34456 80 90 75 81.67 78979 65 65 80 70.00 Write a method printTestScore that takes a TestScores object as argument. The printTestScore method should print one line of output similar to a row in the above table. eg: 34557 70 90 66 75.33 Attachments
Tags
Clarifications

Answers