6.6. (Part 1) TestScores Class - Java

in #programming7 years ago

Starting out with Java: From control structures through objects
Chapter 6
Programming Challenges

  1. TestScores class

Design a TestScores class that has fields to hold 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 an instance of the class. The program should ask the user to enter three test scores, which are stored in the TestScores object. Then the program should display the average of the scores, as reported by the TestScores object.

Gaddis, Tony (2015-05-29). Starting Out with Java: From Control Structures through Objects (Page 398). Pearson Education.
Kindle Edition.

Happy Steeming Everyone! :)

Coin Marketplace

STEEM 0.28
TRX 0.13
JST 0.032
BTC 60906.91
ETH 2920.56
USDT 1.00
SBD 3.69