






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Introduction to computer science. Section Handout of Programming Methodology. NameSurfer. Prof. Sahami. Stanford University.
Typology: Exercises
1 / 10
This page cannot be seen from the preview
Don't miss anything!







The NameSurfer assignment was created by Nick Parlante and further revised by Patrick Young and Eric Roberts
NamesData.txt
... Sam 58 69 99 131 168 236 278 380 467 408 466 Samantha 0 0 0 0 0 0 272 107 26 5 7 Samara 0 0 0 0 0 0 0 0 0 0 886 Samir 0 0 0 0 0 0 0 0 920 0 798 Sammie 537 545 351 325 333 396 565 772 930 0 0 Sammy 0 887 544 299 202 262 321 395 575 639 755 Samson 0 0 0 0 0 0 0 0 0 0 915 Samuel 31 41 46 60 61 71 83 61 52 35 28 Sandi 0 0 0 0 704 864 621 695 0 0 0 Sandra 0 942 606 50 6 12 11 39 94 168 257 ...
Figure 1. Sample run of the NameSurfer program (with names "Sam" and "Samantha")
Sam 58 69 99 131 168 236 278 380 467 408 466
String line = rd.readLine(); NameSurferEntry entry = new NameSurferEntry(line);
"Sam [58 69 99 131 168 236 278 380 467 408 466]"
Figure 3. Starter file for the NameSurferEntry class /*
Figure 5. Starter file for the NameSurferGraph class /*
private NameSurferGraph graph;
graph = new NameSurferGraph(); add(graph);