Java: Outline: The main program will read in a group of three integer values which represent a student's SAT scores. The main program will call a method to determine if these three scores are all valid--valid means in the range from 200 to 800, including both end points, and is a multiple of 10 (ends in a 0). If the scores are all valid, the main program will call a method (which will itself call other methods) to classify the group of three scores in various ways. The main program will repeat this process for the entire set of data, then print some counters. Main Program: The main program will read in and print three integer values, representing SAT scores. Then the main program will call the method isitavalidgroup() to determine whether or not this group is valid. In either case, the main program will print the result of the method call (and add to the appropriate counter – discussed below). In more detail: If the method isitavalidgroup() says this is a valid group, the main program will print a message, add to the counter of valid groups, and call the method classify(). However, if isitavalidgroup() says the group is not valid, the main program will print a message, add to the counter of invalid groups, and go back to read the next group. (And somewhere add to the counter of total groups.) The main program will continue this process for the entire set of data. When the main program runs out of groups of three values (you must decide when this occurs), print the final values of three counters: the total number of groups processed, how many groups were valid, and how many groups were invalid. Use three separate counters. Do not compute one from the others. Methods: 1. Write a method isitavalidgroup() which will receive three parameters. For each parameter value which is invalid (invalid means less than 200 or more than 800 or not a multiple of 10), the method will print the invalid value. The method will return true if all three values are in the range from 200 to 800 and a multiple of 10; otherwise it will return false. 2. Write a method classify() which will receive three parameters (at this point, they must be valid values). This method will call the two methods described below, as follows. Using the method ratesonescore(), classify() will rate each of the three scores, one at a time. There will be three calls to this method, one for each score. Then classify() will use the method findtotalscore() to find the total of the three scores. Then classify() will use the method ratethegroup() to rate the three scores and the total together. Finally, classify() will return to the main program. 3. Write a method rateonescore() which will receive one parameter representing a valid SAT score. The method will determine which of the following three categories the score is in: less than 500, equal or more than 500 but less than 800, or 800 (perfect score). Note this method gets one parameter. 4. Write a method findtotalscore() which will receive three parameters, representing the three scores. The method will determine the total score, which is simply the sum of the three scores. The method will return the total score. (Somewhere it should be printed.) 5. Write a method ratethegroup() which will receive four parameters: the three scores and their total. The method will determine the group status, as follows: If the total score is 2100 or above, and the score on each part is 700 or above, the group status is "outstanding"; if the total score is 2100 or above, and exactly two of the individual scores are 700 or above, the group status is "very good"; if the total score is 2100 or above, and exactly one individual score is 700 or above, the group status is "lop-sided"; NOTE: the three conditions above should all be grouped by total is 2100 or above if the total score is less than 2100, and no individual score is 500 or above, the group status is "weak"; otherwise (if no condition described above is true), the group status is "erratic". In all cases, the method will print the group status. DATA: You will be judged on the quality of your data. Include at least 25 groups, but not necessarily 25! (Your program doesn’t know beforehand how many groups it will process) Include at least 6 invalid groups (spread them through the entire set of data), two with just one invalid, two groups with two invalids, and two with all three invalids. Also have some in the correct range but not multiple of 10. Have some values below 200, some at 200, some at 800, some above 800, and some exactly 500. For the valid groups (have at least 18-20), make sure that the ratethegroup() method prints each possible status every way that status can occur. Be sure the validset() method tests each boundary value (199, 200, 201, 799, 800, and 801) at least once. For the first 3 sets of data use the following: 200 400 600 550 800 650 150 660 455

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Java:

Outline: The main program will read in a group of three integer values which represent a student's SAT scores. The main program will call a method to determine if these three scores are all valid--valid means in the range from 200 to 800, including both end points, and is a multiple of 10 (ends in a 0).
If the scores are all valid, the main program will call a method (which will itself call other methods) to classify the group of three scores in various ways. The main program will repeat this process for the entire set of data, then print some counters.

Main Program:
The main program will read in and print three integer values, representing SAT scores.
Then the main program will call the method isitavalidgroup() to determine whether or not this group is valid. In either case, the main program will print the result of the method call (and add to the appropriate counter – discussed below).

In more detail: If the method isitavalidgroup() says this is a valid group, the main program will print a message, add to the counter of valid groups, and call the method classify().

However, if isitavalidgroup() says the group is not valid, the main program will print a message, add to the counter of invalid groups, and go back to read the next group.
(And somewhere add to the counter of total groups.)

The main program will continue this process for the entire set of data. When the main program runs out of groups of three values (you must decide when this occurs), print the final values of three counters: the total number of groups processed, how many groups were valid, and how many groups were invalid.

Use three separate counters. Do not compute one from the others.

Methods:

1. Write a method isitavalidgroup() which will receive three parameters. For each parameter value which is invalid (invalid means less than 200 or more than 800 or not a multiple of 10), the method will print the invalid value. The method will return true if all three values are in the range from 200 to 800 and a multiple of 10; otherwise it will return false.

2. Write a method classify() which will receive three parameters (at this point, they must be valid values). This method will call the two methods described below, as follows.

Using the method ratesonescore(), classify() will rate each of the three scores, one at a time. There will be three calls to this method, one for each score.

Then classify() will use the method findtotalscore() to find the total of the three scores.

Then classify() will use the method ratethegroup() to rate the three scores and the total together. Finally, classify() will return to the main program.

3. Write a method rateonescore() which will receive one parameter representing a valid SAT score. The method will determine which of the following three categories the score is in: less than 500, equal or more than 500 but less than 800, or 800 (perfect score). Note this method gets one parameter.

4. Write a method findtotalscore() which will receive three parameters, representing the three scores. The method will determine the total score, which is simply the sum of the three scores. The method will return the total score. (Somewhere it should be printed.)

5. Write a method ratethegroup() which will receive four parameters: the three scores and their total. The method will determine the group status, as follows:

If the total score is 2100 or above, and the score on each part is 700 or above, the group status is "outstanding";

if the total score is 2100 or above, and exactly two of the individual scores are 700 or above, the group status is "very good";

if the total score is 2100 or above, and exactly one individual score is 700 or above, the group status is "lop-sided";

NOTE: the three conditions above should all be grouped by total is 2100 or above

if the total score is less than 2100, and no individual score is 500 or above, the group status is "weak";

otherwise (if no condition described above is true), the group status is "erratic".

In all cases, the method will print the group status.

DATA: You will be judged on the quality of your data. Include at least 25 groups, but not necessarily 25! (Your program doesn’t know beforehand how many groups it will process) Include at least 6 invalid groups (spread them through the entire set of data), two with just one invalid, two groups with two invalids, and two with all three invalids. Also have some in the correct range but not multiple of 10. Have some values below 200, some at 200, some at 800, some above 800, and some exactly 500.
For the valid groups (have at least 18-20), make sure that the ratethegroup() method prints each possible status every way that status can occur. Be sure the validset() method tests each boundary value (199, 200, 201, 799, 800, and 801) at least once.

For the first 3 sets of data use the following:
200 400 600
550 800 650
150 660 455

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 5 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY