{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

H34-Assign7Pathfinder

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

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

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.

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

View Full Document
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!
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern