Computer Science 501
Data Structures and Algorithm Analysis
Fall 2014, The College of Saint Rose
This week, you will gain some experience developing and using Vector and similar data structures.
You may work alone or in a group of 2 or 3 on this lab. Only one submission per group is needed.
Getting Set Up
To get your BlueJ environment set up for this week's lab assignment, start BlueJ and choose "New Project" from the "Project" menu. Navigate to your folder for this course and choose the name "Lab2" (no spaces) for the project.
Create a document where you will record your answers to the lecture assignment and lab questions. If you use plain text, call it "lab2.txt". If it's a Word document, you can call it whatever you'd like, but when you submit, be sure you convert it to a PDF document "lab2.pdf" before you submit it.
Lecture Assignment Questions
We will usually discuss these questions at the start of class on the lab due date, so no credit can be earned for late submissions of lecture assignment questions.
Practice Programs
Programming Assignment
For this week's programming project, you will begin working with some real world data derived from highway systems. This same data will be used in other lab assignments later this semester.
A big advantage of working with this kind of data is that it has a connection to reality, and that we can visualize the data and the results of our manipulations of that data with the Google Maps API. This data is collected by the Clinched Highway Mapping (CHM) Project (http://cmap.m-plex.com/). I have taken some of the data from the CHM collaborators and converted into a format that is more convenient for us to load into a graph structure and use. Much more about the project is available at /chm/, but everything you need to know should be on this sheet.
The Data
The data is in ".gra" files which have the following format:
You can find a few dozen example graph files linked from /chm/graphs.html. For example, usai.gra describes the entire U.S. Interstate Highway system. canyt.gra describes a much smaller system: the territorial highway system in the Yukon. The links of most interest to you are the "download" and "view" links.
Over the course of the semester, you will develop a Java program or programs that can read in graph data, store it appropriately in memory, and perform a variety of operations on that data.
For this week, you will work only with waypoint data and ignore the road segments. Your tasks:
Submitting
Before 6:00 PM, Tuesday, September 9, 2014, submit your lab for grading. There are two things you need to do to complete the submission: (i) Copy your file with the answers to the lecture assignment and lab questions into your project directory. Be sure to use the correct file name. If you prepared your answers in Word, export to a PDF file and submit that. (ii) Upload a copy of your lab (a .7z or .zip file containing your project directory) using Submission Box under assignment "Lab2".
Grading
This assignment is worth 90 points, which are distributed as follows:
> Feature | Value | Score |
Lecture Assignment Q1 | 4 | |
Lecture Assignment Q2 | 4 | |
Lecture Assignment Q3 | 2 | |
BitVector fields | 3 | |
BitVector resizes as needed | 3 | |
BitVector constructor(s) | 2 | |
BitVector other methods | 12 | |
BitVector main method with tests | 5 | |
Lab question | 3 | |
Waypoint fields | 3 | |
Waypoint constructor | 3 | |
Waypoint accessors | 3 | |
Waypoint equals | 2 | |
Waypoint toString | 2 | |
WaypointLoader command-line param | 3 | |
WaypointLoader load waypoints into a Vector | 10 | |
WaypointLoader interactive loop | 6 | |
WaypointLoader print all matching waypoints | 10 | |
Comments | 6 | |
Naming conventions | 3 | |
Formatting | 1 | |
Total | 90 | |