DRAFT: This module has unpublished changes.

Version:1.0 StartHTML:0000000105 EndHTML:0000084733 StartFragment:0000008682 EndFragment:0000084697






















Java Based Navigation Solutions
























Tim Sumpter

Glenelg High School

20 June 2010

Dr. James Morgan







     The purpose of this project is to demonstrate and expand the knowledge base of the Java programming language through the application of said knowledge in a program that calculates the shortest route from one location to another within Glenelg High School and displays the route over a map of the school, rendering a simplistic and easily used program for users who are unfamiliar with the building. After six months of coding and four months of data collection, such a program was created that displayed both the top and bottom floors of the building, and traced the routes from one room to another in an easily discerned highlighted manner. To create such a program, the Java programming language within the IntelliJ software development kit was used. Microsoft Excel files were completed to contain coordinates based off of those standard coordinates within the Microsoft Paint program. Completion of this program is significant not only due to the immediate and beneficial impact towards the Glenelg community in easier navigation of the school campus, but also because due to the proving of the concept that smaller campuses and buildings can be effectively mapped similarly to the world’s roadways.



     Computer science is one of the fastest growing fields in modern society. Computer scientists continually take a greater role in the world as more and more components and functions of life become electronic. Their ability to code a solution to a problem and create a program is one that has become invaluable. Attempting to follow the footsteps of those scientists, this project has created an original solution to a common problem- unfamiliarity with a building when one must navigate its hallways to reach a certain destination, in an attempt to further the existing knowledge of coding in the java programming language.  This problem has already been approached by two well-known organizations, Google, and their Google Maps application, and MapQuest and their services. While both provide effective directions around the world’s roadways for travel, they also neglect more specific locations, namely the interiors of buildings and campuses. This project, with the main intent of application and gain of computer science knowledge, has applied such knowledge to solve said problem.









     First, the problem to be solved was identified. This brainstorming process took nearly two months as multiple ideas as to an original and beneficial program for the community were created and reviewed.   

     Second, once the problem was identified, the objects involved and their relationships to each other were discussed and finalized. Multiple objects, representing the campus, buildings, floors, and rooms, were specified.

     Third, the classes and methods to create such objects and allow them to interact were designed. Use cases for each method, laying out their functions and pre and post conditions, were written.

     Fourth, electronic copies of the building floor plans were obtained. These PDF files were later used to render the hallways and rooms and the routes in between them. 

     Fifth, and perhaps the most lengthy in this process was the recording of the coordinates of all junctions, offices, class rooms, and bathrooms, and the subsequent edges from each point to another. To record each coordinate, electronic maps of the school were opened in Microsoft Paint. This ensures uniform coordinates for any computer no matter the screen resolution, as the points given in Paint do not differ with screen resolution.

     Sixth, and beginning during the recording of the coordinates and edges, was the coding of the actual program. Java within the IntelliJ software development kit was used for this step.

     Seventh was extensive testing and debugging of the program, comprising of routes taken from a variety of situations and circumstances.

     Lastly is the posting of the program to the school website. At of the time of this paper, this step has not yet, but will, occur.


















     Results, due to the nature of the project, occurred throughout testing. It was common, and took months of revision, for the coordinates and edges in the CSV files to be corrected. After collection, there were close to four hundred coordinates, edges, and rooms identified within the files. However, after revision and perfection of the CSV files, the program ran smoothly and in a desired manner.

     Feedback to the program, due to the premature nature of this paper, has not yet been collected from users, but will be provided and analyzed over the summer months of 2010.













Due to lack of feedback from the community as of the time of this paper, the results for this project are limited to the observations of the behavior of the program and CSV files. The CSV files generated the most error throughout the project due to the nature of the work. Nearly four hundred edges and points were identified by hand. As a result, human error was largely prevalent within the data collection stage of the project in that there were misidentification of points, incorrect edges created from one point to another, and often skipping of an edge or point. However, after these errors were corrected in a process lasting three months, the program ran smoothly due to debugging taking place as the CSV files were created and revised.












     After proper planning and design work, a working and easily used program for the public allowing people unfamiliar with Glenelg High School was created, this allowing said people to easily navigate its hallways.

     The execution of the project led to many insights into the development of larger programs. Much knowledge concerning the planning and design of objects, classes, and methods was obtained. Information concerning file types in graphics, the creation and execution of JAR files using the command prompt was obtained, and the creation and subsequent use of CSV files was obtained.

     This program upon posting will have broad implications for other concepts and programs of a similar type in that the ease and effectiveness of such mapping programs on a smaller scale will have been demonstrated.









First and foremost, Dr. Morgan, the advisor to the project, is thanked for his devotion to the project. Without his effort, the coding and knowledge gain would not have been possible.

Charles Ashcraft, for his support within the school system and his support of the project’s posting to Glenelg High School’s website, is also thanked for his effort towards the project.















Adding Classes to the JAR File’s Classpath. Retrieved from java.sun.com/docs/‌books/‌tutorial/‌deployment/‌jar/‌downman.html

This source from Sun’s Java Tutorials provides much information about how to reference classes in one jar file in another jar. It is particularly helpful because it includes not only the code needed for the reader, but also a helpful example that clarifies the example provided. In structure, it is very similar to the other sources from this website.

Class Robot. Sun Developer Network. Retrieved October 16, 2009, from Sun Microsystems website: java.sun.com‌j2se/‌1.3/‌docs/‌api/‌java/‌awt/‌Robot.html

This source, direct from Sun Microsystems, the creator of java, concerns the robot class. The robot class had methods for the control of the mouse and keyboard. These methods are mainly used for self running program testing. However, they can also be used as a self running demonstration of a program. This will be helpful for the user of my programs, as they will demonstrate how to use the application. This source lays the information out in an easy-to-understand chart. It clearly defines all of the methods enclosed in the robot class. It would be helpful if it included example programs, like my sources from the textbook.

Creating a JAR File. Retrieved from java.sun.com...‌docs/‌books/‌tutorial/‌deployment/‌jar/‌build.html

This source covers a variety of information on how to create a jar file using the command prompt. It begins with the command line code needed to create a file, and then covers a variety of parameters that can be included to complete the task. Then, it gives an informative example about how to create a jar file in the case of a tic-tac-toe game. This source was very effective, providing good examples and detailed explanations.

Extracting the Contents of a JAR File. Retrieved from java.sun.com‌docs/‌books/‌tutorial/‌deployment/‌jar/‌unpack.html

This source, from the Java Tutorials page, discusses how to extract the contents of a JAR file. When a file is extracted, according to the site, a copy is made of the target file and is placed in a directory. If a directory is not present, it will create one. The source, like the others, uses an example from a fake file called tictactoe. By using an application of the knowledge presented, this source effectively teaches the reader how to extract the files from a JAR.

Gibson, R., & Erle, S. (2006). Google Maps Hacks. O’Reilly Media, Inc.

This book teaches the reader to manipulate Google Maps in ways that are more advanced than just using the service. Some of these “hacks” as they are called include including Google maps in one’s own applications, adding one’s own markers on the maps, and adding photographs and Flash applets to Google Maps. This source was extremely helpful; it includes many examples and screen shots from computers running Google Maps. This source will be very helpful when designing and coding the program, as I will already have some background knowledge on the subject.

The History of Java Technology. Retrieved from www.java.com...‌en/‌javahistory/‌index.jsp

This source, written by Sun Microsystems, provides an interesting and concise history about the background behind the java programming language. Though not actually advancing towards my knowledge of the language, it is interesting to know the background behind the technology that is being used in this project. Though interesting, it lacks a more information leading to events in the last 15 years, including information only about its very beginning.

Lewis, J., Loftus, W., & Cocking, C. (2007). Arrays. In Java Software Solutions (pp. 317-375). Pearson.

This source covers a multitude of topics including indexing arrays, declaring and using arrays, initializing arrays, passing arrays as parameters, filling an array with objects, command line arguments, searching arrays, sorting arrays using the selection sort, the insertion sort, and sorting an array of objects, comparing sorts, hashing, two dimensional arrays, the arraylist class, specifying an arraylist type, and general usage of an ArrayList. This source was helpful in explaining the various functions and syntax of arrays. They will be very important later in storing and sorting information within my programs. The way the information was presented was similar to the way in which the other information from this textbook was presented.

Lewis, J., Loftus, W., & Cocking, C. (2007). Enhancing Classes. In Java Software Solutions (pp. 259-303). Pearson.

This chapter covers many topics such as null references, this references, aliases, passing objects as parameters, static variables, static methods, throwing exceptions and exception messages, interfaces, including the comparable, list, and iterator interfaces, class design, nested classes, inner classes, and GUIs. This source is very straightforward, using example programs to illustrate the discussed areas. The information in this chapter is vital for the coding of longer, and more advanced programs, as it discusses having multiple classes in one program, and how those classes interact.

Lewis, J., Loftus, W., & Cocking, C. (2007). Inheritance. In Java Software Solutions (pp. 392-450). Pearson.

This source covers a multitude of subjects including subclasses, the super reference, multiple inheritance, overriding methods, class hierarchies, the object class, abstract class, indirect use of class members, designing classes for inheritance, polymorphism, polymorphism with interfaces, inheritance and GUIs and applets, and mouse events. This source was very helpful because when explaining arrays, it uses many graphical organizers to explain the set up of an array and how they functions. It also displayed many example outputs for example programs. This source resembled the other sources from the same textbook, and will be required when building more advanced programs, as multiple classes will be needed in building these programs. A good working knowledge of this information will be invaluable.

Lewis, J., Loftus, W., & Cocking, C. (2007). Linear Data Structures. In Java Software Solutions (pp. 513-535). Pearson.

This source covers topics such as collections, java API collection classes, generic types, dynamic data structures, managing linked lists, inserting nodes, deleting nodes, LinkedLists, and queues and stacks. This source helps the reader understand the more complicated concepts by summarizing them in easy to locate light blue notes along the side of the page. It also included comprehensive organizers which aid in the comprehension of the structures. This information will make the storage of information easier.

Lewis, J., Loftus, W., & Cocking, C. (2007). Non-Linear Data Structures. In Java Software Solutions (pp. 551-586). Pearson.

This source mainly discusses trees, and included sets and maps, traversal, binary search trees, TreeSets and TreeMaps, heaps, heapsort, implementing heaps, and hashtables. This source made heavy use of graphical organizers to simplify and aid in the comprehension of trees. While interesting, it is not certain that this will be extremely helpful in the building of the programs.

Lewis, J., Loftus, W., & Cocking, C. (2007). Objects and Primitive Data. In Java Software Solutions (pp. 51-111). Pearson.

This chapter covers basic Java syntax and vocabulary. It mentions Strings, and their concatenation, abstraction, various variable types, assignments, constants, precedence in when using arithmetic operators, the importation of class libraries and packages, including the random and scanner classes, the format of output, and graphics. This source is very helpful. It gives detailed descriptions of each topic, accompanied by an example of a program that utilized that topic, and also specific lines of code that apply to that topic. This chapter of the book forms the foundation of my knowledge base. Without this information, it would not be possible to continue further in my research, or to begin anywhere else.

Lewis, J., Loftus, W., & Cocking, C. (2007). Program Statements. In Java Software Solutions (pp. 125-178). Pearson.

This chapter covered many topics such as program design, if statements, equality and rational operators, block statements, nested if statements, the comparison of strings and floating point values, increment and decrement operators, assignment operators, while statements, infinite loops, nested loops, iterators, the for statement, and comparing loops. This source is very helpful, not only discussing the topics, but also providing examples of how they work. It is similar to the other sources from this textbook, as it uses uniform methods of teaching. This source is vital for my knowledge, as the topics discusses here are needed for more advanced programs.

Lewis, J., Loftus, W., & Cocking, C. (2007). Recursion. In Java Software Solutions (pp. 465-499). Pearson.

This source covers a variety of subjects including recursive thinking, recursion in math, infinite recursion, recursive programming, recursion v. iteration, direct v. indirect recursion, applications of recursion, recursion in sorting, merge sorting, quick sort, recursion in graphics, and fractals. This source was extremely helpful, using both sample programs and organizers to explain proper usage of recursion. It was great in showing the many uses of recursion. The format of this source was similar to those of the same text book. This information will be important in making my programs more efficient.

Lewis, J., Loftus, W., & Cocking, C. (2007). Writing Classes. In Java Software Solutions (pp. 195-242). Pearson.

This source covers many areas such as classes, instance data, encapsulations, methods, the return statement, parameters, preconditions and postconditions, constructors, local data, accessors and mutators, method overloading, method decomposition, object relationships, applet methods, and graphical objects. This source was reliable and helpful. It provided sample outputs of sample programs to show the effects of various pieces of syntax. It used attractive graphical organizers to display information. This program will be vital for building longer programs of more than one method. Overall, it was similar in style to the other sources from this book.

Modifying a Manifest File Retrieved from java.sun.com/docs/‌books/‌tutorial/‌deployment/‌jar/‌modman.html

This source discusses the ways in which a programmer can modify a manifest file. It begins by discussing what modifications can be made, and then provides the exact line of code needed to modify the file. It also discusses the various parameters that can be used to modify a manifest, and defines what effects each parameter has. This source will be important when modifying the JAR in the event that it does not work correctly, or demands other formalities.

Ohio State University. What Is CSV? /‌ Converting Spreadsheet Data To CSV Format. Retrieved from 8help.osu.edu/‌1701.html

This source from Ohio State University is both reliable and helpful on the topic of csv, or Comma Seperated Value files. It provides information on what a csv files is, its various uses, and also how to create one from a Microsoft Office Excel file format. This source will be helpful in understanding the type of file that the coordinates, edges, penalties, and other related information will be stored in. It is ideal for reading in information to the program. Though not particuraly applicable to myself due to good fortune, the author of the file should include information on how users of software other than Excel could produce the file.

Running JAR-Packaged Software. Retrieved from java.sun.com‌/docs/‌books/‌tutorial/‌deployment/‌jar/‌run.html

This source provides an in-depth explanation of how to run a jar file. It includes information on how to run a JAR of an applet and application. This source is especially helpful, as it includes warning to the user about how particular situations may arise and how to fix them. The program created for this project will be an application, so particular attention will be paid to that component of the source.  This source will be particuraly important to my project, as I will eventually have to run the jar file repeatedly to ensure that the application is free of error.

Setting an Application’s Entry Point. Retrieved from java.sun.com/docs/‌books/‌tutorial/‌deployment/‌jar/‌appman.html

This source, from the Java Tutorials site, was similar in format to the other sources found at this site. It discusses how to, in further depth, create a JAR file application. The source begins with the line of code needed to point the JAR to the starting point in the program and explains the reserved words used. The source then provides a specific example of how to perform the required actions, and discusses a shortcut associated with the action as made available by the new version of java. This will be particuraly helpful when creating the jar file.

Sun Microsystems. Class Collections. Retrieved from java.sun.com/‌j2se/‌1.4.2/‌docs/‌api/‌java/‌util/‌Collections.html

This source is from the creator of Java, Sun Microsystems. It discusses the collection class, ideal for sorting and storing information. This will be helpful when approaching the task of comparing the legths of different edges against each other when computing the shortest distance from one point to another. This source lays out all of the methods enclosed in the program, including their parameters, and thoroughly explains them, making this an optimal source.

Understanding the Default Manifest. Retrieved from java.sun.com/‌docs/‌books/‌tutorial/‌deployment/‌jar/‌defman.html

This source, provided by the Java Tutorials page, is important to understanding the default manifest file provided by java. It gives the line of code needed to access the file’s manifest and also the information given by a manifest. This source rather short, but, as part of a series, is most likely a calculated installment in the overall information that must be learned. To improve this source, an example could be provided to make it easier to understand.

Using JAR Files: The Basics. Retrieved from java.sun.com‌docs/‌books/‌tutorial/‌deployment/‌jar/‌basicsindex.html

This source, from the Java Tutorials page, a website geared towards assisting those who lack knowledge in a certain area, provided this source. This source defines what a jar file is and also the command prompt code lines needed to create, view the contents of, extract, run an applet of, and invoke an application from a jar file.

Viewing the Contents of a JAR File. Retrieved from java.sun.com/‌docs/‌books/‌tutorial/‌deployment/‌jar/‌view.html

This source discusses how a programmer can go about viewing the contents of a JAR file. It begins with a basic code line, but goes on to discuss more complicated parameters than can be used to view different components of the JAR, including a table of contents and also the date last modified. Like the other sources from this site, it includes a detailed example that clarifies the presented material. This will be important when review the jar file to ensure that all components have been included.

Working with Manifest Files: The Basics. Retrieved from java.sun.com‌/docs/‌books/‌tutorial/‌deployment/‌jar/‌manifestindex.html

This source, provided by the Java Tutorials site, is a short, yet concise introduction to manifest files. It defines what a manifest file is, its many functions, and the variety of functions a JAR can be made to have with use of the manifest. This source could be improved by discussing when a manifest file should be used instead of simply discussing what it is. Otherwise, a reader may think it vital to their project when in reality it is not.












Use Case Definitions

Name: Find Route/ Shortest Path

Summary: Will calculate a route from the user’s current location to the POI

Users: All Users

Preconditions: The user’s current position and the location of the POI must be known

Course of Events:

The user indicates that they wish to find a route to the POI

The software requests the user’s current position and the location of the POI

The software identifies pathways from the user to the POI

The software calculates the distances of the possible routes

The software compares them and identifies the shortest route

The software highlights the identified route on the screen

Post Conditions: A route has been displayed for the user


Name: Identify Location/ Destination

Summary: This allows the user to identify a POI, and finds and returns the user’s location and the location of the POI.

Preconditions- The world and its spaces and solids must be known

Users: All Users

Course of Events:

The software finds the location of the user

The user is prompted to enter a search term for their POI

The user scrolls and points to a POI

The chosen POI becomes the destination

Post Condition: The user’s location and POI must be identified and located


Name: Find Nearest POI

Summary: The software will find the nearest POI relative to the user

Pre Condition: The user’s location must be known

Course of Events:

The software gets the user’s current location

The software finds all possible points of interest

It calculated the distance from the user to those POI’s

The software identifies the closest one based on smallest distance.

The software presents the user with the closest POI

Post Conditions: The closest POI to the user must be identified and displayed

Name: Find the World

Summary: The software must identify the world that the user is currently located in

Pre Conditions: the location of the user must be known

Course of Events:

The user must be located

The world around the user is identified

The solids and spaces of the world are defined

The POI’s of that world are identified

Access to different levels of the world are identified

Post Conditions: The world and its characteristics must be defined



DRAFT: This module has unpublished changes.