Question: Java code question: Our weighted graph will represent these datais by with edge-weights equal to the connection strength among between two individual characters. SeriesCharacter is

Java code question:

Our weighted graph will represent these datais by with edge-weights equal to the connection strength among between two individual characters.

SeriesCharacter is an object with name. The graph vertices are the Characters of this TV-Series Characters. (Use a hash table to map SeriesCharacters into graph vertices). In your main method, provide the following functionalitiesy: A) ReadFileGOTGraph() // loads GOT data and returns a graph B) printClosesestCharacters(toCharacter, threshold) //strength is less smaller than a threshold (e.g., 15) C) printFartherCharacters(toCharacter, threshold) // strength is greathigher than a threshold (e.g., 15) D) isconnected(character1, character2): User gives two characters, your program searches and prints a message indicating if whether these two characters are connected to each other. E) pathTo(character1, character2): User gives two characters, then your program searches and prints the shortest path from character1 to character2 with least number of hopes. If there are several shortest paths, printing one of them is enough. F) delete(character1, character2): User gives two characters, and your program deletes the connection between them. G) change(character1, character2, newWweight): User gives two characters, and your program changes updates the connection strength between them by newWeight H) NumberofcharacterGroups: Prints the number of character (connected components) groups.and Characters in each component. If there is only single group you can delete some links and test this functionality. Eg. Group Component 1: Ali, Sansa, Jon Group Component 2: Veli, Kim, Deli I) Custom function1: Add your own function which is not listed above. J) Custom function2: Add your own function which is not listed above.

Java code question: Our weighted graph will represent these datais by with

edge-weights equal to the connection strength among between two individual characters. SeriesCharacter

is an object with name. The graph vertices are the Characters of

this TV-Series Characters. (Use a hash table to map SeriesCharacters into graph

vertices). In your main method, provide the following functionalitiesy: A) ReadFileGOTGraph() //

loads GOT data and returns a graph B) printClosesestCharacters(toCharacter, threshold) //strength is

less smaller than a threshold (e.g., 15) C) printFartherCharacters(toCharacter, threshold) // strength

174 Jon Val 55 3 2 54 777 55 5 179 11 3 182 Jorah 6 7 Kevan 184 Kevan un Loras 186 5 ysa Lysa 10 29 5 4 11 8 196 Mance 197 Mance 198 Mance 10 199 Mance 200 Mance 201 Mance 202 Mance Mance 2 Meera 2es Melisandre Melisandre 5 5 2018 irri 209 Myrcella 10 210 Myrcella 211 Oberyn 5 212 Oberyn 213 Podrick 214 Rattleshirt 4 5 215 Renly 8 7 216 Renly 217 Renty 218 Rhaegar 219 Rhaegar 4 5 7 5 6 220. Rhaegar 221 Rhaegar 222 Rickard 4 223 Rickon 3 15 224 Robb 225 Robb 226 Robb 23 5 227 Robb 228 Robin 229 Robb 2 5 230 Robb 5 15 231 Robb 232 Robb 18 233 Robb 10 234 Robb Jon 14 235 Roth 10 236 Robb 5 237 Robb 4 7 238 Roblo 239 Roblo un 240 Robb 4 241 Robb 242 Robb 4 24 1 Source Target Weight 2 Aemon Grenn 5 3 Aemon Samwelt 31 4 Aerys Jaime 18 5 Aerys Robert 6 6 Aerys Tyrion 5 7 Aerys Tywin 8 8 Alliser Mance 5 9 Amory Oberyn 5 10 Arya Anguy 11 11 Arya Beric 23 12 Arya Bran 9 13 Arya Brynden 6 14 Arya Cersei 5 15 Arya Gendry 43 16 Arya Gregor 7 17 Arya Jaime 11 18 Arya Joffrey 6 19 Arya Jon 7 7 2e Arya Rickon 8 21 Arya Robert 4 22 Arya Roose 5 23 Arya Sandor 46 24 Arya Thoros 18 25 Arya Tyrion 5 26 Balon Loras 4 27 Belwas Barristan 18 28 Belwas Illyrio 10 29 Beric Anguy 4 30 Beric Gendry 4 31 Beric Thoros 21 32 Bran Hodor 96 33 Bran Jojen 46 34 Bran Jon 12 35 Bran Luwin 4 36 Bran Meera 54 37 Bran Nan 14 38 Bran Rickon 35 39 Bran Samwell 11 40 Bran Theon 11 41 Brienne Loras 7 42 Bronn Gregor 5 43 Bronn Podrick 19 44 Brynden Lothar 4 45 Brynden Walder 5 46 Catelyn Bran 4 47 Catelyn Brienne 7 48 Catelyn Brynden 8 49 Catelyn Cersei 4 5e Catelyn Edmure 16 51 Catelyn Hoster 9 9 52 Catelyn Jaime 19 53 Catelyn Jeyne 10 54 Catelyn Lysa 8 55 Catelyn Petyr 5 56 Catelyn Robb 43 57 Catelyn Roose 4 58 Catelyn Roslin 6 6 59 Catelyn Sansa 8 6a Catelyn Stannis 4 61 Catelyn Tyrion 5 62 Catelyn Walder 19 63 Cersei Brienne 5 64 Cersei Bronn 4 65 Cersei Elia 4 66 Cersei Gregor 6 6 67 Cersei llyn 7 68 Cersei Jaime 36 69 Cersei Joffrey 23 7a Cersei Meryn 10 72 Cersei Pycelle 4 72 Cersei Robert 16 73 Cersei Sandor 6 74 Cersei Shae 4 25 Cersei Tyrion 46 76 Cersei Varys 4 77 Craster Karl 6 6 28 Daario Drogo 4 79 Daario Irri 5 80 Daenerys Aegon 8 81 Daenerys Barristan 20 82 Daenerys Belwas 26 83 Daenerys Daario 14 84 Daenerys Drogo 18 85 Daenerys Irri 17 86 Daenerys Jorah 47 87 Daenerys Kraznys 10 88 Daenerys Missandei 26 89 Daenerys Rakharo 7 90 Daenerys Rhaegar 12. 91 Daenerys Robert 5 92 Daenerys Viserys 8 93 Daenerys Worm 14 94 Davos Cressen 4 4 95 Davos Salladhor 16 96 Eddard Arya 18 97 Eddard Beric 8 98 Eddard Bran 15 99 Eddard Catelyn 5 180 Eddard Cersei 6 181 Eddard Jaime 6 102 Eddard Jon 8 103 Eddard Rickon 8 184 Eddard Robb 13 185 Eddard Robert 10 186 Eddard Sandor 5 107 Eddard Sansa 6 108 Eddison Grenn 8 189 Edmure Brynden 7 110 Edmure Lothar 4 111 Edmure Roslin 16 112 Edmure Walder 9 113 Gendry Thoros 7 114 Gilly Craster 17 115 Gregor Elia 9 116 Gregor llyn 7 117 Gregor Meryn 7 118 Gregor Oberyn 24 119 Gregor Sandor 12 120 Hodor Jojen 35 121 Hodor Meera 41 122 Hoster Edmure 9 123 Irri Drogo 7 124 Jaime Balon 6 125 Jaime Barristan 4 126 Jaime Brienne 88 127 Jaime Edmure 5 128 Jaime Elia 4 129 Jaime Gregor 6 130 Jaime Joffrey 15 131 Jaime Loras 16 132 Jaime Meryn 11 133 Jaime Qyburn 11 134 Jaime Renly 7 135 Jaime Robert 17 136 Jaime Stannis 5 132 Jaime Tommen 8 138 Jaime Tyrion 31 9 1 141 Janos 4 5 142 Joffrey 143 Joffrey 4 144 Joffrey 8 7 145 Joffrey 7 146 Joffrey 28 5 147 Joffrey 5 148 Joffrey in 149 Joffrey 4 4 150 Joffrey 14 151 Joffrey 10 152 Joffres O 153 Joffrey 54 33 154 Joien 155 Joier 11 156 Jor 30 15 257 on on 158 7 6 SS 4 lon 25 55 8 69 SS 4 4 7 6 6 168 31 20 55 171 5 52 9 16 123 on Sty

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!