### Question:
LargestDegreeFirstColoring extends GreedyColoring<V, E> { public LargestDegreeFirstColoring(Graph<V, E> graph) { super(graph); } LargestDegreeFirstColoring(Graph<V, E> graph);   }### Answer:
@Test public void testLargestDegreeFirstColoring() { Graph<Integer, DefaultEdge> g = new SimpleGraph<>(DefaultEdge.class); Graphs.addAllVertices(g, Arrays.asList(1, 2, 3, 4, 5)); g.addEdge(1, 2); g.addEdge(1, 3); g.addEdge(1, 3); g.addEdge(1, 4); g.addEdge(1, 5); g.addEdge(2, 3); g.addEdge(3, 4); g.addEdge(3, 5); Coloring<Integer> coloring = new LargestDegreeFirstColoring<>(g).getColoring(); assertEquals(3, coloring.getNumberColors()); Map<Integer, Integer> colors = coloring.getColors(); assertEquals(0, colors.get(1).intValue()); assertEquals(2, colors.get(2).intValue()); assertEquals(1, colors.get(3).intValue()); assertEquals(2, colors.get(4).intValue()); assertEquals(2, colors.get(5).intValue()); }