Campus Shortest Path Finder

Individual Personal Project 02/2017


Java Interface

The interface consist of two parts:

(1) The GUI for user to select their start and end locations by using the drop-down menus with a campus map of Columbia University showing the shortest paths.
(2) A console for user to manually type in the name/ID of the start and end locations, which will later pop out the requested shortest route with all the intermediate stops, directions, and the total distance in the unit of feet.


Implementation Methods

  • The application was designed using the model-view-controller (MVC) design pattern. It consists of three parts: (1) Model, (2) View, and (3) Controller.
  • The model consists of the classes that represent data, as well as the classes that load, store, look up, or operate on data. These classes know nothing about what information is displayed to the user and how it’s formatted. Instead, it only takes charge of: (a) reading, parsing, and storing data (b) providing methods for the view to access data (c) Performing computations or operations involving the data and returning the result (d) updating the in-memory state (e) writing to the data source
  • The view implements the user interface. It stores very little data and perform very light computation. It rely on the model for data storage and manipulation. The view decides how the user sees and interacts with this data. In this case, GUI with drop-down menus and map and a textual interface were used at the same time.
  • The controller listens to user input. Based on the user’s keystrokes, mouse clicks, the controller determines their intentions and dispatches to the appropriate methods in the model or view.
  • The model parses two input csv files: CU_map_data_Nodes and CU_map_data_Edges, and builds a graph that represents the Columbia University campus map. And it uses Dijkstra’s Algorithm to find the shortest route between two buildings.
the csv file of nodes data
the csv file of edges data

What I learned

  • Implementing Graph data structure and Dijkstra’s Algorithm using Java
  • Java specifications, custom abstract data types(ADT), and abstract functions
  • Java testing using Eclipse IDE
  • Polymorphism and subtyping
  • Parametric polymorphism and Java generics
  • Refactoring
  • Java GUI programming and Event-driven programming