33-assignment-6

33-assignment-6 - CS 106A Handout #33 July 30, 2009...

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

View Full Document Right Arrow Icon
Handout #33 CS 106A July 30, 2009 Assignment #6—NameSurfer The NameSurfer assignment was created by Nick Parlante and later adapted by Patrick Young. Due: Monday, August 10 at 10:30am You can only use 2 late days on assignment #6. Last day to turn it in is Wednesday, Aug 12th . This assignment has two primary goals. The first is to give you an opportunity to use Java interactors to create an application that looks more like a modern interactive program complete with buttons, text fields, and a resizable graphical display. The second goal is to pull together the various facilities you have learned about so far to create an interesting application that—unlike Breakout, Hangman, and Yahtzee—is not a game but rather a useful program that enables you to think about some fascinating sociological questions. Overview of the NameSurfer project Against all bureaucratic stereotypes, the Social Security Administration, provides a neat web site showing the distribution of names chosen for kids over the last 100 years in the United States ( http://www.ssa.gov/OACT/babynames/ ). Every 10 years, the data gives the 1000 most popular boy and girl names for children. The data can be boiled down to a single text file that looks something like this: 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 . . . Each line of the file begins with the name, followed by the rank of that name in each of the 11 decades since 1900, counting the current one: 1900, 1910, 1920, and so on up to 2000. A rank of 1 indicates the most popular name that year, while a rank of 997 indicates a name that is not popular at all. A 0 entry means the name did not appear in the top 1000 names for that year and therefore indicates a name that is even less popular. The elements on each line are separated from each other by a single space. The lines happen to be in alphabetical order, but nothing in the assignment depends on that fact. As you can see from the small excerpt from the file, the name Sam was #58 in the first decade of the 1900s and is slowly moving down. Samantha popped on the scene in the 1960s (possibly because Bewitched ran on television during those years) and is moving up strong to #7. Samir barely appears in the 1980s, but by the current decade is up to
Background image of page 1

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

View Full DocumentRight Arrow Icon
– 2 – #798. The database counts children born in the United States, so trends in particular names tend to reflect the evolution of ethnic communities over the years. The goal of this assignment is to create a program that graphs these names over time,
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.

This note was uploaded on 10/14/2010 for the course CS 106A taught by Professor Sahami,m during the Fall '08 term at Stanford.

Page1 / 10

33-assignment-6 - CS 106A Handout #33 July 30, 2009...

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