Class Scheduler

This code is implemented in JAVA with Java SDK 1.8 and Unit test cases are in JUNIT4

Dependencies

Since Java does not provide JSON library, an external dependency has been added to parse JSON String. ####List of External Dependencies

  • json-simple-1.1.1

How do I get set up?

Summary of set up

A bash script or an executable is provided with the bundle which takes input argument fileName. The bash script calls the executable generated by the code.

Module Description

#####Cycle Detector This module is responsible for detecting cycle in the graph created using subject and its prerequisites.

#####Graph Helper Graph Helper contains various methods to help create connections in the graph and traversing the graph to print the output. #####Input Validator Input Validator validates the input. #####Reader Reader contains helper functions to read the file and convert it into JSON object. It also contains method to convert JSON Array into graph nodes. #####Error Handler It contains helper functions to print error in standard format.

Entry Description

#####Subject

  • name - Name of the subject
  • subjectCode - A number generated by the code and assigned uniquely to each subject.
  • prerequisites - List of prerequisites in String format.
  • prerequisitesConnections - List of Subject with reference to prerequisites.