How do I write this java program in hashmap? The program should create charts showing the consistency of the two judges. The rows represent the scores given by Dr. Stansifer and the columns represent the scores given by Dr. Shoaff. Suppose the maximum score is 3 the judges give the following scores. Manatee ID Dr. Shoaff's Score Dr. Stansifier's Score 1 0 0 23 0 3 14 0 0 5 3 0 19 2 3 18 1 1 12 3 2 204 1 1 6 0 0 25 3 3 The consistency chart resulting from these scores are:   0 1 2 3 0 3 0 0 1 1 0 2 0 0 2 0 0 0 1 3 1 0 1 1 The "3" in the upper left hand corner indicates that there were 3 manatees that Dr Shoaff and Dr Stansifer gave a 0 score. (namely manatee 1, 14, 6). The 1 in row 0, column 1 indicates there was 1 manatee that Dr. Shoaff scored a 0 while Dr Stansifer scores a 3 (namely manatee 23). Ideally the only non-zero entries in the table would be along the diagonal indicating perfect consistency. Your program should take a group of scores and build the corresponding table. Sample Input The input to the program will consist of one or more data sets. Each data sets will begin with a single integer, max where 0 ≤max

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

How do I write this java program in hashmap?

The program should create charts showing the consistency of the two judges. The rows represent the scores given by Dr. Stansifer and the columns represent the scores given by Dr. Shoaff. Suppose the maximum score is 3 the judges give the following scores.

Manatee ID Dr. Shoaff's Score Dr. Stansifier's Score
1 0 0
23 0 3
14 0 0
5 3 0
19 2 3
18 1 1
12 3 2
204 1 1
6 0 0
25 3 3

The consistency chart resulting from these scores are:

  0 1 2 3
0 3 0 0 1
1 0 2 0 0
2 0 0 0 1
3 1 0 1 1

The "3" in the upper left hand corner indicates that there were 3 manatees that Dr Shoaff and Dr Stansifer gave a 0 score. (namely manatee 1, 14, 6). The 1 in row 0, column 1 indicates there was 1 manatee that Dr. Shoaff scored a 0 while Dr Stansifer scores a 3 (namely manatee 23). Ideally the only non-zero entries in the table would be along the diagonal indicating perfect consistency. Your program should take a group of scores and build the corresponding table.

Sample Input

The input to the program will consist of one or more data sets. Each data sets will begin with a single integer, max where 0 ≤max <e; 20, the maximum score a manatee may receive. There will be one or more lines representing the scores given by the judges. They will be in the following format

 

judge manateeNumber score

where:

  • Judge is a single letter, "H", "W","E", "H" representing Dr. Shoaff's score, "W" representing Dr. Stansifer's score, and "E" marking the end of scores for this dataset.
  • manatee is a postive number representing the manatee number
  • score is a integer, 0 ≤score ≤ max

The end of input will be indicated by the data-set will max ≤ 0. This is not another data set, and should not be processed.

3 H 1 0

H 19 2

W 25 3

H 12 3

H 204 1

H 6 0

W 1 0

H 5 3

H 25 3

W 23 3

W 14 0

W 5 0

W 19 3

H 23 0

W 18 1

H 14 0

H 18 1

W 12 2

W 204 1

W 6 0

H 10 2

W 100 2

E 0 0

Sample Output

The consistency matrix should be printed in row major order, one row per line, with one blank between each pair of consective entries. Only manatees which have been scored by both judges should be included in the consistency matrix. There should be a blank line after the consistency matrix for each data set.

3 0 0 1

0 2 0 0

0 0 0 1

1 0 1 1 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Math class and its different methods
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
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