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

Java Programming (Class Assignment)

julesxdujour
julesxdujour 


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 rest 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 Test Score object. Then the program should display the average of the score, as reported by the TestScores object. Turn in TestScores.java and TestScoresMain.java source code files Attachments
Tags Clarifications

Answers

TestScores

dickersonka
dickersonka 



TestScores eclipse project... Attachments
TestScores.zip (3 K) Download





Preview
} /** * Set score2 * @param score2 - Score2 */ public void setScore2(double score2) { this.score2 = score2; } /** * Set score3 * @param score3 - Score3 */

Preview
//Get score1 double score = scanner.nextDouble(); //Set score 1 scores.setScore1(score); //SCORE 2 //Prompt for score2 System.out.print("Enter test score 2: "); //Get score2 score = scanner.nextDouble(); //Set score 2

Screenshots
Purchase Answer