Project 2 - Topological Sorting |
< Previous Next > |
COURSE1 COURSE2where COURSE1 is a prerequisite to COURSE2 and
NONE COURSE3where COURSE3 has no prerequisites . They have provided an example file based on the prerequisites for Exercise Science:
BIOL_2010 BIOL_2020 BIOL_2010 EXSC_3830 EXSC_3830 EXSC_4000 EXSC_3830 EXSC_4230 EXSC_3830 EXSC_4240 EXSC_4000 EXSC_4010 EXSC_4240 EXSC_4260
ABCD_1000 ABCD_2000 ABCD_1000 ABCD_3000 ABCD_1500 ABCD_2000 ABCD_2000 ABCD_3000 ABCD_2000 ABCD_3500
ABCD_1000 ABCD_2000 ABCD_1000 ABCD_3000 ABCD_1500 ABCD_2000 ABCD_2000 ABCD_3000 ABCD_2000 ABCD_3500 NONE ABCD_4000
ABCD_9000 ABCD_8000 ABCD_9000 ABCD_7000 ABCD_9500 ABCD_8000 ABCD_8000 ABCD_7000 ABCD_8000 ABCD_7500 NONE ABCD_8888 NONE ABCD_6000
Please enter the prereqs filename (or simply press return to run all of the test cases) Found 8 vertices and 7 edges in ./project2A.tab Course order: BIOL_2010 EXSC_3830 EXSC_4240 EXSC_4260 EXSC_4000 EXSC_4010 EXSC_4230 BIOL_2020Note, other topological orders exist. Your program does not have to match the order of this example exactly, it just needs to be a valid topological order. You do need to display "Course order:", then the vertices in the topological order. Do not display other information after this.
Points Item ---------- -------------------------------------------------------------- _____ / 10 Style + Code is indented correctly + Functions should be no longer than 1 page + Documentation: (written for another software developer) * All source code files include Javadoc header block with description, author, version/date, etc. * Javadoc (with block tags) before each method * All non-trivial variables are commented * Comments included before major portions of code _____ / 0 Program compiles without errors _____ / 0 Program executes without crashing Requirements met: _____ / 20 + Digraph class with appropriate methods and data members _____ / 40 + Topological sort gives correct results _____ / 8 + Test files [that you made] _____ / 2 Completed rubric _____ / 80 Total _____ Approximate number of hours spent I, (REPLACE WITH YOUR FULL NAME), affirm that the code that I submitted is my own work and that I did not receive help that was not authorized by the instructor.
Copy and paste this rubric into a rubric-project2.txt file (not a .docx, .doc nor .rtf file). Think of this as a checklist to ensure that you receive the maximum points possible. For each grade item, fill in your estimate for the grade you deserve. Additionally, include your estimate of how many hours your spent. Lastly, replace, "(REPLACE WITH YOUR FULL NAME)" with your full name to indicate that what you are submitting is entirely your own work.
javac *.java java TopologicalSortif main() is in a class named TopologicalSort. Otherwise, use:
javac *.java java DigraphThis also means not using the package keyword.