Question: please help JAVA implementation Complete the main method in BaseMain.java. It should: Load data-kanji.txt, use it to populate a hashtable that maps IDs to characters,

please help JAVA implementation

Complete the main method in BaseMain.java. It should: Load data-kanji.txt, use it to populate a hashtable that maps IDs to characters, and add the IDs as nodes in the graph. Load data-components.txt, and use it to add edges to the graph being built. Create an IntuitiveTopological object, and use it to sort the graph. Display the characters in the ordering. Note that topological sort will produce a list of a IDs - you'll need to take the IDs and uses them to look up the correct character in the hashtable you populated earlier.

Please find BaseMain.java below

/** * Program for generating kanji component dependency order via topological sort. */ public class BaseMain { /** * Entry point for testing. * @param args the command line arguments */ public static void main(String[] args) { //TODO: implement this

//Freebie: this is one way to load the UTF8 formated character data. //BufferedReader indexReader = new BufferedReader(new InputStreamReader(new FileInputStream(new File("data-kanji.txt")), "UTF8")); } }

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!