Test Case 4 How many integers do you have? (Max 20) \n -40 ENTER You must enter a number in between 1 and 20 \n Test Case 5 How many integers do you have? (Max 20) \n 5 ENTER Enter element fo subscript 0 \n 6 ENTER Enter element for subscript 1 \n 5 ENTER Enter element for subscript 2 n 8 ENTER Enter element for subscript 3 \n 90 ENTER Enter element for subscript 4 \n 300 ENTER Here are all of those numbers \n 6 \n 5 \n 8 \n 90 \n 300 \n

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 13RQ
icon
Related questions
Question
… When the program says How many integers do you have? (Max 20), ensure that only a number between 1 and 20 is entered. If the input is outside that range, then print a message and end the program. Write in java and use test case examples as a result.
Test Case 1
How many integers do you have? (Max 20) \n|
-1JENTER
You must enter a number in between 1 and 20 \n
Test Case 2
How many integers do you have? (Max 20) \n
211ENTER
You must enter a number in between 1 and 20 \n
Transcribed Image Text:Test Case 1 How many integers do you have? (Max 20) \n| -1JENTER You must enter a number in between 1 and 20 \n Test Case 2 How many integers do you have? (Max 20) \n 211ENTER You must enter a number in between 1 and 20 \n
Test Case 4
How many integers do you have? (Max 20) \n
-40ENTER
You must enter a number in between 1 and 20 \n
Test Case 5
How many integers do you have? (Max 20) \n
5 ENTER
Enter element for subscript 0\n
6 ENTER
Enter element for subscript 1 \n
5 ENTER
Enter element for subscript 2 n
8 ENTER
Enter element for subscript 3 \n
90 ENTER
Enter element for subscript 4 \n
300ENTER
Here are all of those numbers \n
6 \n
5\n
8 \n
90 \n
300 \n]
Transcribed Image Text:Test Case 4 How many integers do you have? (Max 20) \n -40ENTER You must enter a number in between 1 and 20 \n Test Case 5 How many integers do you have? (Max 20) \n 5 ENTER Enter element for subscript 0\n 6 ENTER Enter element for subscript 1 \n 5 ENTER Enter element for subscript 2 n 8 ENTER Enter element for subscript 3 \n 90 ENTER Enter element for subscript 4 \n 300ENTER Here are all of those numbers \n 6 \n 5\n 8 \n 90 \n 300 \n]
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning