MCPcopy Index your code
hub / github.com/careercup/ctci / PrintColor

Method PrintColor

java/Chapter 9/Question9_7/Question.java:9–23  ·  view source on GitHub ↗
(Color c)

Source from the content-addressed store, hash-verified

7 }
8
9 public static String PrintColor(Color c) {
10 switch(c) {
11 case Black:
12 return "B";
13 case White:
14 return "W";
15 case Red:
16 return "R";
17 case Yellow:
18 return "Y";
19 case Green:
20 return "G";
21 }
22 return "X";
23 }
24
25 public static void PrintScreen(Color[][] screen) {
26 for (int i = 0; i < screen.length; i++) {

Callers 1

PrintScreenMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected