Problem Description You have been asked by Helicopter Parents, a popular website
ID: 3804402 • Letter: P
Question
Problem Description You have been asked by Helicopter Parents, a popular website for parents, to write a Java GUI application that will show the popularity of a baby name for a particular year. They have supplied you with baby name popularity data from 2006 to 2010. The application should ask the user for a Year, Gender, and Name. The application will then show the rank information. Specifications You will need to ask for the Year, Gender and Name. Use a ComboBox for the Year and Gender, and a Textbox for the Name. There should be a button named Find Ranking, and a non-editable Textbox that shows the ranking for the entered information. You have been provided with 5 text files containing ranking information. You are free to edit these anyway you wish. However, your application needs to read from a text file(s) into a Java Collection. The information is not to be hardcoded in the code. If there is no ranking for the entered information, a message saying such should be shown in the bottom Textbox. Page Break Error Checking Inputs There must be a value in all three user entered fields. All fields need to be correct when the Find Ranking button is pressed. Use a Try-Catch blocks where you deem appropriate.
Links to 5 text files for the years 2006- 2010
Baby Names Rankings-- 2006- https://learn.vccs.edu/bbcswebdav/pid-97922905-dt-content-rid-100173712_2/xid-100173712_2
Baby Names Rankings--2007- https://learn.vccs.edu/bbcswebdav/pid-97922905-dt-content-rid-100173713_2/xid-100173713_2
Baby Names Rankings--2008- https://learn.vccs.edu/bbcswebdav/pid-97922905-dt-content-rid-100173714_2/xid-100173714_2
Baby Names Rankings--2009- https://learn.vccs.edu/bbcswebdav/pid-97922905-dt-content-rid-100173715_2/xid-100173715_2
Baby Names Rankings--2010- https://learn.vccs.edu/bbcswebdav/pid-97922905-dt-content-rid-100173716_2/xid-100173716_2
**NOTE**
The GUI can look anyway one desires as long as it has and implements all the material required in the directions.
Explanation / Answer
import acm.util.*; import java.util.*; public class NameSurferEntry implements NameSurferConstants { /* Constructor: NameSurferEntry(line) */ /** * Creates a new NameSurferEntry from a data line as it appears * in the data file. Each line begins with the name, which is * followed by integers giving the rank of that name for each * decade. */ public NameSurferEntry(String line) { // You fill this in // } /* Method: getName() */ /** * Returns the name associated with this entry. */ public String getName() { // You need to turn this stub into a real implementation // return null; } /* Method: getRank(decade) */ /** * Returns the rank associated with an entry for a particular * decade. The decade value is an integer indicating how many * decades have passed since the first year in the database, * which is given by the constant START_DECADE. If a name does * not appear in a decade, the rank value is 0. */ public int getRank(int decade) { // You need to turn this stub into a real implementation // return 0; } /* Method: toString() */ /** * Returns a string that makes it easy to see the value of a * NameSurferEntry. */ public String toString() { // You need to turn this stub into a real implementation // return ""; } }
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.