Question: write a Java program to read a graph data file which will be used in subsequent programming assignments. The first row of the file indicates
write a Java program to read a graph data file which will be used in subsequent programming assignments. The first row of the file indicates the number of nodes and the following rows denote the connections for each node. The following examples are two data files.
Write a Java program called Color The program should read two parameters from the command line o The first parameter is a data filename o The second parameter is an integer value k o Allocate a 2D array for the data o Write a method to print out the graph data o Write a note to describe how I can javac your program


In this assignment, you are going to write a Java program to read a graph data file which will be used in subsequent programming assignments. The first row of the file indicates the number of nodes and the following rows denote the connections for each node. The following examples are two data files 00 1001 00 10 11 110111 00 10 11 01 1 101 10 0100110000 10 1000 1000 010 1000100 0010 100010 1001000001 1000000110 0100000011 00 10010001 000 101 1000 0000 101100 YOUR TASKS Write a Java program called "Color" The program should read two parameters from the command line o o o o o The first parameter is a data filename The second parameter is an integer value - k Allocate a 2D array for the data Write a method to print out the graph data Write a note to describe how I can "javac" your program >>java Color data1.txt 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
