Question: Please help me to write a Java program to read the Marvel universe social network from the csv files nodes.csv, edges.csv, and hero-network.csv. Compute and
Please help me to write a Java program to read the Marvel universe social network from the csv files nodes.csv, edges.csv, and hero-network.csv.
Compute and print the following statistics for the social network:
Number of heroes
Number of comics
Mean books per character
The example of three csv files are here:
(coma separates the hero and comic in edges.csv and inside the edges.csv file contains hero and comic)
edges.csv
hero,comic
24-HOUR MAN/EMMANUEL,AA2 35
3-D MAN/CHARLES CHAN,AVF 4
3-D MAN/CHARLES CHAN,AVF 5
3-D MAN/CHARLES CHAN,COC 1
3-D MAN/CHARLES CHAN,H2 251
3-D MAN/CHARLES CHAN,H2 252
3-D MAN/CHARLES CHAN,M/PRM 35
3-D MAN/CHARLES CHAN,M/PRM 36
3-D MAN/CHARLES CHAN,M/PRM 37
3-D MAN/CHARLES CHAN,WI? 9
4-D MAN/MERCURIO,CA3 36
4-D MAN/MERCURIO,CM 51
4-D MAN/MERCURIO,Q 14
4-D MAN/MERCURIO,Q 16
4-D MAN/MERCURIO,T 208
4-D MAN/MERCURIO,T 214
4-D MAN/MERCURIO,T 215
4-D MAN/MERCURIO,T 216
4-D MAN/MERCURIO,T 440
8-BALL/,SLEEP 1
8-BALL/,SLEEP 19
8-BALL/,SLEEP 2
Note: (here coma separates the hero1 and hero2 inside the hero-network.csv file contains hero1 and hero2)
hero-network.csv
hero1,hero2
"LITTLE, ABNER","PRINCESS ZANDA"
"LITTLE, ABNER","BLACK PANTHER/T'CHAL"
"BLACK PANTHER/T'CHAL","PRINCESS ZANDA"
"LITTLE, ABNER","PRINCESS ZANDA"
"LITTLE, ABNER","BLACK PANTHER/T'CHAL"
"BLACK PANTHER/T'CHAL","PRINCESS ZANDA"
"STEELE, SIMON/WOLFGA","FORTUNE, DOMINIC"
"STEELE, SIMON/WOLFGA","ERWIN, CLYTEMNESTRA"
"STEELE, SIMON/WOLFGA","IRON MAN/TONY STARK "
"STEELE, SIMON/WOLFGA","IRON MAN IV/JAMES R."
"STEELE, SIMON/WOLFGA","RAVEN, SABBATH II/EL"
"RAVEN, SABBATH II/EL","FORTUNE, DOMINIC"
"RAVEN, SABBATH II/EL","ERWIN, CLYTEMNESTRA"
"RAVEN, SABBATH II/EL","IRON MAN/TONY STARK "
"RAVEN, SABBATH II/EL","IRON MAN IV/JAMES R."
"IRON MAN IV/JAMES R.","FORTUNE, DOMINIC"
"IRON MAN IV/JAMES R.","ERWIN, CLYTEMNESTRA"
"IRON MAN IV/JAMES R.","IRON MAN/TONY STARK "
"IRON MAN/TONY STARK ","FORTUNE, DOMINIC"
"IRON MAN/TONY STARK ","ERWIN, CLYTEMNESTRA"
Note: (here coma separates the node and type, and inside the nodes.csv file contains node and type)
nodes.csv
node,type
2001 10,comic
2001 8,comic
2001 9,comic
24-HOUR MAN/EMMANUEL,hero
3-D MAN/CHARLES CHAN,hero
4-D MAN/MERCURIO,hero
8-BALL/,hero
A '00,comic
A '01,comic
A 100,comic
A 101,comic
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
