public class TotalAndOut0fRangeCounts public static void main(String[] args) { final int LOW_LIMIT = 20; final int HIGH_LIMIT = 40; Scanner in = new Scanner (System.in); %3D // Step 2: Declare variables for the two counts // with initial values // Step 3: Display the input prompt // "Enter an integer or Q to quit: %3D // Step 4: While the input is an integer // Read the integer Update the total count If the input integer is out of the range Update the out of range count Prompt for the next input using the same prompt // // // saved

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
Source Code
12
* @author
13
* @version
ackage
14
*/
15 public class TotalAndOut0fRangeCounts
16
public static void main(String[] args)
17
18
final int LOW_LIMIT
19
= 20;
final int HIGH_LIMIT = 40;
20
21
Scanner in= new Scanner (System.in);
22
23
// Step 2: Declare variables for the two counts
//
24
25
with initial values
26
27
// Step 3: Display the input prompt
28
//
"Enter an integer or Q to quit:
29
30
31
// Step 4: While the input is an integer
//
32
Read the integer
33
Update the total count
If the input integer is out of the range
Update the out of range count
Prompt for the next input using the same prompt
34
//
35
36
//
ne.
//
37
38
saved
Transcribed Image Text:Source Code 12 * @author 13 * @version ackage 14 */ 15 public class TotalAndOut0fRangeCounts 16 public static void main(String[] args) 17 18 final int LOW_LIMIT 19 = 20; final int HIGH_LIMIT = 40; 20 21 Scanner in= new Scanner (System.in); 22 23 // Step 2: Declare variables for the two counts // 24 25 with initial values 26 27 // Step 3: Display the input prompt 28 // "Enter an integer or Q to quit: 29 30 31 // Step 4: While the input is an integer // 32 Read the integer 33 Update the total count If the input integer is out of the range Update the out of range count Prompt for the next input using the same prompt 34 // 35 36 // ne. // 37 38 saved
// Step 3: Display the input prompt
//
"Enter an integer or Q to quit:
// Step 4: While the input is an integer
//
Read the integer
//
//
Update the total count
If the input integer is out of the range
Update the out of range count
Prompt for the hext input using the same prompt
*//
// Step 5: Display the two counts on separate lines
starting with three spaces
//
// Sample output
//
The total count: 8.
//
The out of range count: 4.
saved
Transcribed Image Text:// Step 3: Display the input prompt // "Enter an integer or Q to quit: // Step 4: While the input is an integer // Read the integer // // Update the total count If the input integer is out of the range Update the out of range count Prompt for the hext input using the same prompt *// // Step 5: Display the two counts on separate lines starting with three spaces // // Sample output // The total count: 8. // The out of range count: 4. saved
Expert Solution
steps

Step by step

Solved in 3 steps with 2 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