Add a new method to ArrayTools with filter. Make this method accept a String array. Change all the Strings that are longer than 5 characters to uppercase.   Write in Java and use test cases 1 & 2 as a result.

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

Add a new method to ArrayTools with filter. Make this method accept a String array. Change all the Strings that are longer than 5 characters to uppercase.

 

Write in Java and use test cases 1 & 2 as a result. 

Test Case 2
How many strings? n
10 ENTER
Enter a value: \n
doltishness ENTER
Enter a value: \n
subclass ENTER
Enter a value: \n
carbonized ENTER
Enter a value: \n
myxoma ENTER
Enter a value: \n
quiring ENTER
Enter a value: \n
confutative ENTER
Enter a value: \n
weald ENTER
Enter a value: \n
unerringly ENTER
Enter a value: \n
unpensioning ENTER
Enter a value: \n
indagative ENTER
[0]: DOLTISHNESS <-- Longer than five letters \n
[1]: SUBCLASS <-- Longer than five letters \n
[2]: CARBONIZED <-- Longer than five letters \n
[3]: MYXOMA <-- Longer than five letters \n
[4]: QUIRING <-- Longer than five letters \n
[5]: CONFUTATIVE <-- Longer than five letters \n
[6]: weald \n
[7]: UNERRINGLY <-- Longer than five letters \n
[8]: UNPENSIONING <-- Longer than five letters \n
[9]: INDAGATIVE <-- Longer than five letters \n
Transcribed Image Text:Test Case 2 How many strings? n 10 ENTER Enter a value: \n doltishness ENTER Enter a value: \n subclass ENTER Enter a value: \n carbonized ENTER Enter a value: \n myxoma ENTER Enter a value: \n quiring ENTER Enter a value: \n confutative ENTER Enter a value: \n weald ENTER Enter a value: \n unerringly ENTER Enter a value: \n unpensioning ENTER Enter a value: \n indagative ENTER [0]: DOLTISHNESS <-- Longer than five letters \n [1]: SUBCLASS <-- Longer than five letters \n [2]: CARBONIZED <-- Longer than five letters \n [3]: MYXOMA <-- Longer than five letters \n [4]: QUIRING <-- Longer than five letters \n [5]: CONFUTATIVE <-- Longer than five letters \n [6]: weald \n [7]: UNERRINGLY <-- Longer than five letters \n [8]: UNPENSIONING <-- Longer than five letters \n [9]: INDAGATIVE <-- Longer than five letters \n
Test Case 1
How many strings? n
8 ENTER
Enter a value: An
aaaaaa ENTER
Enter a value: \n
aaaaa ENTER
Enter a value: \n
aaaa ENTER
Enter a value: \n
aaa ENTER
Enter a value: \n
aa ENTER
Enter a value: \n
a ENTER
Enter a value: \n
aaaaaaa ENTER
Enter a value: \n
hello world does this thing Work? ENTER
[0]: AAAAAA <-- Longer than five letters \n
[1]: аaaaa | \n
[2]: аaaa\n
[3]: aaa n
[4]: aa \n
[5]: a \n
[6]: AAAAAAA <-- Longer than five letters \n
[7]: HELLO WORLD DOES THIS THING WORK? <-- Longer than five letters \n
Transcribed Image Text:Test Case 1 How many strings? n 8 ENTER Enter a value: An aaaaaa ENTER Enter a value: \n aaaaa ENTER Enter a value: \n aaaa ENTER Enter a value: \n aaa ENTER Enter a value: \n aa ENTER Enter a value: \n a ENTER Enter a value: \n aaaaaaa ENTER Enter a value: \n hello world does this thing Work? ENTER [0]: AAAAAA <-- Longer than five letters \n [1]: аaaaa | \n [2]: аaaa\n [3]: aaa n [4]: aa \n [5]: a \n [6]: AAAAAAA <-- Longer than five letters \n [7]: HELLO WORLD DOES THIS THING WORK? <-- Longer than five letters \n
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

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