This website is preserved for historical and scholarly reference and is no longer actively maintained.
                         CpSc 241, Section 1
                             Assignment 10
                             12 April 2000


Due: Tuesday, April 25, at midnight

Late penalties: 20 points per partial day late.  That is, programs
	turned in after midnight Tuesday and before midnight Wednesday
	will have 20 points deducted for late, programs turned in after
	midnight Wednesday and before midnight Thursday will have a total
	of 40 points deducted for late, etc.

Total point value of assignment:  100 points

Late submissions not accepted after: Saturday, April 29, at midnight

This assignment is to be done in groups of three or fewer students.
It is expected that all students will contribute approximately
equal effort to a group project.  Typically a confidential
questionnaire is given to all participants in a group project
to determine if allocation of grade should be other than equal.


Create a directory, A10, which will contain all parts of this assignment.
A10 should include code for all classes that you use.  

The objective of this program are to give you experience programming
a classic graph problem.


The main() will be called a10.cc or a10.cpp, whichever you choose.  Submit
all files in directory A10 using handin. An outline of code using
Dijkstra's algorithm is given on pages 339-346 of the text.  You should use
this basic algorithm and the data structures shown in class.  


Input:

    Read information from a file, a10.dat.  Each line of the
	will contain distances between cities (i.e., the graph).
    Your data might look something like:

        Atlanta      Chattanooga      115
        Columbia     Atlanta          213          
        ...

Output:

	Before reading the input, print your name, the assignment number,
	and a short description of the assignment to the screen.

    Always "echo print" the input information.

    Request the user to enter a start city.
	Request the user to enter an ending city.
	(You may want to give the user a list to choose from.)
	Compute the shortest distance from the start city to the ending
	city.  Your output should consist of a list of edges to be
	traversed in the shortest distance (including weights) and the
	total distance to be traveled from start to ending city.

	It is preferable for the program to loop, allowing the
	user to select different pairs of start/ending cities 
	until the user indicates s/he has no more requests.

Other requirements:

	Follow the style standards to be found from your instructor's
	web page for CPSC 241.


Grading rubric:

	In the opinion of the instructor the program is an honest attempt
		to complete the assignment as described  10 pts.

	If the above requirement is met:
		Required documentation and style standards 20 pts.
        (This 20 pts. includes required output to screen of
         your name, assignment 10, etc.)

	If the two previous requirements are not met or the program does
    not compile, no further points will be awarded.

    Program compiles without error. (10 pts.)
    Program produces correct output for grader's input files. (40 pts.)
    Efficient use of algorithms and data structures.  (10 pts.)
	Program loops for more user requests. ( 5 pts.)
	Quality of user interface (clarity, friendliness, etc.) ( 5 pts.)


Comment:  For this program, it is recommended, but not required, that
    you store the edge information in adjacency lists.  However, use
    of the adjacency matrix instead of adjacency lists will deduct 10 points.