H34-Assign7Pathfinder

H34-Assign7Pathfinder - CS106B J Zelenski Handout #34 Mar...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS106B Handout #34 J Zelenski Mar 5, 2007 Assignment #7: Pathfinder Due: Fri Mar 14 2:15pm Absolutely no late assignments accepted after Mon Mar 17 Have you ever wondered how MapQuest and Google Maps or those tiny little GPS units work their magic? Get ready to find out! In this final CS106B challenge, you will take your now-superior C++ skills, employ a variety of classes (including writing a class template of your own) and implement two classic and elegant graph algorithms. I can't think of a better way to cap off our intense journey. When you look back at where you were at the end of CS106A, did you imagine you'd be ready for something this fancy just 10 weeks later? Wow! The program from a user’s perspective From the user's point of view, the program draws a graph and provides two operations: finding the shortest path between two locations and constructing the minimal cost network. The user chooses the graph data file for the program to read and display. Below, the Stanford data file is displayed: The program offers the user a menu of choices, as shown below: Your options are: (1) Choose a new graph data file (2) Find shortest path using Dijkstra's algorithm (3) Compute the minimal spanning tree using Kruskal's algorithm (4) Quit Enter choice: If the user chooses the shortest path search, the program prompts the user to click on two locations. The program finds the shortest path connected the two and displays it. If the user chooses the minimal spanning tree option, the program determines the set of links that connect all locations with the minimal overall cost and displays them. The user can do additional searches and/or change data files. The program exits when the user chooses to quit.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The program from an implementer's perspective Behind the scenes, this assignment is designed to accomplish the following objectives: • To give you practice working with graphs and graph algorithms. • To give you more mileage with C++ pointers and dynamic memory. Many of you commented on the mid-quarter evals that you felt a bit of mystery still surrounds these topics. I'm hoping that conquering the chunklist improved your confidence and this assignment should further solidify your understanding. • To learn how to adapt existing code (in this case, the PQueue from the previous assignment) for use in a new context. The majority of programming that people do in the industry consists of modifying existing systems rather than creating them from scratch. • To continue making good use of our handy class library. Several of the classes have a role to play and your spiffy PQueue is critical for the two priority-driven algorithms. This assignment covers material from the entire quarter and is an opportunity to show your mastery over the complete CS106B repertoire. Set your personal goal to make your final project truly shine!
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

H34-Assign7Pathfinder - CS106B J Zelenski Handout #34 Mar...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online