ask the user for an integer then ask the user if he/she wants to count up or down. Display a table of numbers where the first column contains the counter, the second column contains the counter plus 10 , and the third column contains the counter plus 100. Make it so each number takes up 5 spaces total. If the counting up, the first column should contain numbers 1 through the user input. If counting down, the first column should contain numbers -1 through the negative of the user input; Do user input validation on the word “up” and. “Down” Please write in Java

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section8.2: Lookup Tables And The Iferror Function
Problem 7QC
icon
Related questions
Question
ask the user for an integer then ask the user if he/she wants to count up or down. Display a table of numbers where the first column contains the counter, the second column contains the counter plus 10 , and the third column contains the counter plus 100. Make it so each number takes up 5 spaces total. If the counting up, the first column should contain numbers 1 through the user input. If counting down, the first column should contain numbers -1 through the negative of the user input; Do user input validation on the word “up” and. “Down” Please write in Java
Test Case 1
Enter an ending value \n
10 ENTER
Count up or down? \n
up ENTER
11
101 \n
12
102 \n
3.
13
103 \n
4
14
104 \n
5.
15
105 \n
6.
16
106 \n
7.
17
107 \n
8.
18
108 \n
6.
19
109 \n
10
20
110 \n
Test Case 2
Enter an ending value \n
8 ENTER
Count up or down? \n
Up ENTER
1
11
101 \n
12
102 \n
13
103 \n
4
14
104 \n
15
105 \n
16
106 \n
7.
17
107 \n
8.
18
108 \n
Transcribed Image Text:Test Case 1 Enter an ending value \n 10 ENTER Count up or down? \n up ENTER 11 101 \n 12 102 \n 3. 13 103 \n 4 14 104 \n 5. 15 105 \n 6. 16 106 \n 7. 17 107 \n 8. 18 108 \n 6. 19 109 \n 10 20 110 \n Test Case 2 Enter an ending value \n 8 ENTER Count up or down? \n Up ENTER 1 11 101 \n 12 102 \n 13 103 \n 4 14 104 \n 15 105 \n 16 106 \n 7. 17 107 \n 8. 18 108 \n
Test Case 7
Enter an ending value \n
30 ENTER
Count up or down? \n
9 ENTER
Count up or down? \n
W ENTER
Count up or down? \n
ewewew ENTER
Count up or down? \n
junk ENTER
Count up or down? \n
garbage ENTER
Count up or down? \n
dOWN ENTER
-1
9
99 \n
-2
8.
98 \n
-3
97 \n
-4
96 \n
-5
95 \n
-96
4
94 \n
-7
93 \n
-8
2.
92 \n
-9
1.
91 \n
-10
90 \n
-11
-1
89 \n
-12
-2
88 \n
-13
-3
87 \n
-14
-4
86 \n
-15
-5
85 \n
-16
-6
84 \n
83 \n
82 \n
-17
-7
-18
-8
-19
-9
81 \n
-20
-10
80 \n
-21
-11
79 \n
-22
-12
78 \n
-23
-13
77 \n
-24
-14
76 \n
-25
-15
75 \n
-26
- 16
74 \n
-27
-17
73 \n
-28
- 18
72 \n
-29
- 19
71 \n
-30
- 20
70 \n
Transcribed Image Text:Test Case 7 Enter an ending value \n 30 ENTER Count up or down? \n 9 ENTER Count up or down? \n W ENTER Count up or down? \n ewewew ENTER Count up or down? \n junk ENTER Count up or down? \n garbage ENTER Count up or down? \n dOWN ENTER -1 9 99 \n -2 8. 98 \n -3 97 \n -4 96 \n -5 95 \n -96 4 94 \n -7 93 \n -8 2. 92 \n -9 1. 91 \n -10 90 \n -11 -1 89 \n -12 -2 88 \n -13 -3 87 \n -14 -4 86 \n -15 -5 85 \n -16 -6 84 \n 83 \n 82 \n -17 -7 -18 -8 -19 -9 81 \n -20 -10 80 \n -21 -11 79 \n -22 -12 78 \n -23 -13 77 \n -24 -14 76 \n -25 -15 75 \n -26 - 16 74 \n -27 -17 73 \n -28 - 18 72 \n -29 - 19 71 \n -30 - 20 70 \n
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,