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
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
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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

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

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

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images

Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education