Question: undefined Question 1 10 pts Write a method called paintByNumber which accepts two Maps as parameters. The first map links a number value (integer) to

undefined Question 1 10 pts Write a method called paintByNumber which acceptstwo Maps as parameters. The first map links a number value (integer)undefined

Question 1 10 pts Write a method called paintByNumber which accepts two Maps as parameters. The first map links a number value (integer) to a count of the times that number occurs (integer) in a paint by number image. The second map links each paint by number value (integer) to the associated color for that number (string). Your method should return a map of the colors (strings) linked to their counts (integers) in the picture. Additionally, your method should print which color has the most spots to color in the image. For example, if your method was passed: numbers - [4-21, 1-10, 3-51, 2-90, 5-60} colors = {4-Black, 1-Red, 5-Green, 3.Purple, 2-Yellow) Then your method would return {Red-10, Green60, Black-21. Yellow.90, Purple-51) Note that the ordering of the colors 'does not matter. Your method would also print Yellow has the most spaces to color! If more than one color has the highest count, this statement would print for every color with the max count of spaces. You are not allowed to construct any auxiliary data structures to solve the problem (no list, array, string, new sets or maps, etc) except the one new map that needs to be returned. Your method is expected to have reasonable efficiency in that it shouldn't lead to more operations than necessary. Namnle afin Ru Nimber picture Note that the ordering of the colors does not matter. Your method would also print Yellow has the most spaces to color! If more than one color has the highest count, this statement would print for every color with the max count of spaces. You are not allowed to construct any auxiliary data structures to solve the problem (no list, array, string, new sets or maps, etc) except the one new map that needs to be returned. Your method is expected to have reasonable efficiency in that it shouldn't lead to more operations than necessary. Example of a Paint By Number Picture: . F Edit View Insert Format Tools Table 12pt Paragraph av Tv

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!