Create a Java program   5. Stand out, Fit in by CodeChum Admin A good spy can always recognize another spy. No matter how good the disguise or how well they blend in, something about spies will always stand out and make them unique.   For your final exam in Spy school you have to distinguish spies that are hiding in plain sight and among the public. You're given a multidimensional array that shows the people in a certain area. A spy is found if there is at least one of the people that is unique from all the others.   Inputs 1. Number of rows of the multidimensional array   2. Number of columns of the multidimensional array   3. Elements of the multidimensional array Each element is within the range: 0 <= n <= 10   Sample Output Enter the number of rows: 3 Enter the number of columns: 3 1 2 2 7 3 8 4 4 3 SPY   Expected Output Enter the number of rows: 4 Enter the number of columns: 3 4 3 3 2 3 6 5 4 6 3 5 2 NONE   Expected Output Enter the number of rows: 4 Enter the number of columns: 4 5 6 2 4 3 5 7 2 3 2 1 7 2 6 8 3 SPY   Expected Output Enter the number of rows: 4 Enter the number of columns: 4 5 3 3 2 2 4 5 1 9 8 1 8 9 2 4 5 NONE   Expected Output Enter the number of rows: 4 Enter the number of columns: 3 3 4 2 1 3 6 2 5 9 1 8 9 SPY   Expected Output Enter the number of rows: 4 Enter the number of columns: 5 4 1 8 4 2 3 7 9 2 0 3 1 4 8 9 4 5 9 0 1 SPY

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
icon
Related questions
Question
100%

Create a Java program

 

5. Stand out, Fit in

by CodeChum Admin

A good spy can always recognize another spy. No matter how good the disguise or how well they blend in, something about spies will always stand out and make them unique.

 

For your final exam in Spy school you have to distinguish spies that are hiding in plain sight and among the public. You're given a multidimensional array that shows the people in a certain area. A spy is found if there is at least one of the people that is unique from all the others.

 

Inputs

1. Number of rows of the multidimensional array

 

2. Number of columns of the multidimensional array

 

3. Elements of the multidimensional array

Each element is within the range: 0 <= n <= 10

 

Sample Output

Enter the number of rows: 3 Enter the number of columns: 3 1 2 2 7 3 8 4 4 3 SPY
 
Expected Output
Enter the number of rows: 4 Enter the number of columns: 3 4 3 3 2 3 6 5 4 6 3 5 2 NONE
 
Expected Output
Enter the number of rows: 4 Enter the number of columns: 4 5 6 2 4 3 5 7 2 3 2 1 7 2 6 8 3 SPY
 
Expected Output
Enter the number of rows: 4 Enter the number of columns: 4 5 3 3 2 2 4 5 1 9 8 1 8 9 2 4 5 NONE
 
Expected Output
Enter the number of rows: 4 Enter the number of columns: 3 3 4 2 1 3 6 2 5 9 1 8 9 SPY
 
Expected Output
Enter the number of rows: 4 Enter the number of columns: 5 4 1 8 4 2 3 7 9 2 0 3 1 4 8 9 4 5 9 0 1 SPY
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Can you do it like this? for input.
Thank you

Sample Output
Enter the number of rows: 3
Enter the number of columns: 3
122
738
4 4 3
SPY
Transcribed Image Text:Sample Output Enter the number of rows: 3 Enter the number of columns: 3 122 738 4 4 3 SPY
Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Adjacency Matrix
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
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education