JAVA
(Baby name popularity ranking) The popularity ranking of baby names from the years 1960s to 2010 are stored in files named babynameranking_1960s.txt, babynameranking_1970s.txt,…, babynameranking_2010s.txt (See the attached zip file). Each file contains two hundred lines. Each line contains a ranking, a boy’s name, a number for the boy’s name, a girl’s name, and a number for the girl’s name. For example, the first two lines in the file babynameranking_2010s.txt are as follows:
1 Noah 182,896 Emma 194,667 2 Liam 173,636 Olivia 184,192 · |
So, the boy’s name Noah and the girl’s name Emma are ranked #1 and the boy’s name Liam and the girl’s name Olivia are ranked #2. 182,896 boys are named Noah and 194,667 girls are named Emma in the 2010s. Write a program that prompts the user to enter the year, gender, and followed by a name, and displays the ranking of the name for the year.
Example Run of it.
Enter the year: 2010 Enter the gender: M Enter the name: John Boy name John is ranked #26 in 2010s |
I need the code to be made to where I can just add the files to be read myself as I cannot send zip files through Chegg. If you could add a comment within the code explaining where i need to add the one zip file that would be greatly appreciated.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
- Please create a Java class that has the following data attributes and methods: private int count - number of customers in the array private customer Record[] data - array of customerRecord objects public customer List() constructor that should initialize memory for data array and count value public void getCustomerList(String fileName) - reads a file call fileName which is a text file containing lines (records) of customer data. This method fills the data array with the records from the file. The file will not have more than 100 records and will have the following format (where customer Number is an integer, firstName and lastName are Strings, and balance is a float: customerNumber firstName lastName balance public customerRecord getCustomer(int customerNumber) - returns the object corresponding to the customer with customerNumber. If the customer number is not in the array, return null. public void enter CustomerRecord(customerRecord new_record)…arrow_forwardJAVA PROGRAM Homework #2. Chapter 7. PC #13. Name Search (page 492) Read these instructions for additional requirements carefully. Write a program that reads the contents of the two files into two separate arrays. The user should be able to enter a name the application will display messages indicating whether the names were among the most popular. 1. GirlNames.txt and BoyNames.txt contain a list of the 200 most popular names given to girls/boys born in the United States for the years 2000 through 2009. 2. Your application should use an array to hold the names. 3. The program should continue interacting with the user indefinitely unless the user chooses to quit by entering "QUIT" (should be case insensitive). 4. The user should enter a single name and the program will search the name in both lists. The user SHOULD NOT specify whether the search is for girls name or boys name. The program is responsible for finding either or both and telling the user where it found it. 5.…arrow_forwardJava code 8. Given an existing ArrayList named friendList, find the first index of a friend named Sasha and store it in a new variable named index. 9. Given that an ArrayList of Integers named numberList has already been created and several values have already been inserted, write the statement necessary to insert the value 25 at the end of the list. 10. Declare an integer array named evens and fill it with even numbers from 2 through 10 in one statement. 11. Given an existing array named pets, find the size of the array and store it in a new variable named numPets. 12. Given an existing ArrayList named contactList, find the number of contacts in the ArrayList and store it in the existing variable named numContacts.arrow_forward
- in java #6 - program that reads the name data from the files named firstNames.txt and lastNames.txtand produces a list of 1000 random names randomPeople.txtone complete name (firstname lastname) per linearrow_forwardAmong other things, the purpose of this assignment is to assess the student's ability to write a program dealing with sorting, arrays, and collections. seed = 3 Input: Ann Chris chris don don chris chris Bill Intermediate Results: Ann Bill Chris don Final Results: PROGRAM SPECIFICATIONS don Chris Bill Ann seed = 4 Beginning with the file that you downloaded named Proj04.java, create a new file named Proj04Runner.java to meet the specifications given below. Input: ann Ann Ann Don Don don Chris Chris Intermediate Results: ann Chris Don Note that the code in the file named Proj04.java. Final Results: ann Don Chris seed = 5 Input: Ann ann Ann Bill don bill Chris Ann Intermediate Results: Ann Bill Chris don Be sure to display your name in the output as indicated. When you place both files in the same folder, compile them both, and run the file named Proj04.java with a command-line argument of 6, the program must display the text shown below on the command line screen. Final Results: don…arrow_forwardJAVA PROGRAM (Create large dataset) Create a data file with 500 lines. Each line in the file consists of a faculty member’s first name, last name, rank, and salary. The faculty member’s first name and last name for the ith line are FirstNamei and LastNamei. The rank is randomly generated as assistant, associate, and full. The salary is randomly generated as a number with two digits after the decimal point. The salary for an assistant professor should be in the range from 50,000 to 80,000, for associate professor from 60,000 to 110,000, and for full professor from 75,000 to 130,000. Save the file in Salary.txt. Here are some sample data: FirstName1 LastName1 assistant 60055.95 FirstName2 LastName2 associate 81112.45 . . . FirstName500 LastName500 full 92255.21arrow_forward
- Using C# in Microsoft Visual Studio create an application that grades the written portion of the driver’s license exam. The exam has 20 multiple-choice questions. (The correct answers are provided in the screenshot.) the program should store these correct answers in an array. The program should read the student’s answers for each of the 20 questions from a text file and store the answers in another array. (Create your own text file to test the application.) After the student’s answers have been read from the file, the program should display a message indicating whether the student passed or failed the exam. (A student must correctly answer 15 of the 20 questions to pass the exam.) It should then display the total number of correctly answered questions, the total number of incorrectly answered questions, and a list showing the question numbers of the incorrectly answered questions.arrow_forwardReadInstructor. The class will: – Create an array of instructor objects – Read the instructors.txt file – Create an Instructor object for each line of input and store the object in the array. – After closing the file, it will print out a line for each instructor in the array. Input file:Mary Smith 1991 50000.00 John Jones 2000 90000.00 Terry Seidel 1992 51000.00 Jessica Terrell 2000 91000.00arrow_forwardPython write a program in python that plays the game of Hangman. When the user plays Hangman, the computer first selects a secret word at random from a list built into the program. The program then prints out a row of dashes asks the user to guess a letter. If the user guesses a letter that is in the word, the word is redisplayed with all instances of that letter shown in the correct positions, along with any letters correctly guessed on previous turns. If the letter does not appear in the word, the user is charged with an incorrect guess. The user keeps guessing letters until either: * the user has correctly guessed all the letters in the word or * the user has made eight incorrect guesses. one for each letter in the secret word and Hangman comes from the fact that incorrect guesses are recorded by drawing an evolving picture of the user being hanged at a scaffold. For each incorrect guess, a new part of a stick-figure body the head, then the body, then each arm, each leg, and finally…arrow_forward
- Hello, I’m a beginner java student!arrow_forwardIn c++, Using STL containers, components, and algorithms show all data from the text file movies.txt. Please make sure the list updates once the user adds a new movie to the text file. Console Movies program COMMAND MENU show - user is able to see all available movies from movies.txt command: show The Adventures of a Babysitter $10 Barney $25 Larry the Car Man $15 Dora and the missing map $15 Ceasar and the Lunch Lady $10 Suzie and the Bad Kids $13.95 command: add cout << "What movie do you want to add?"; cin >> BeeHive $12; cout << "Movie added"; command:show The Adventures of a Babysitter $10 Barney $25 Larry the Car Man $15 Dora and the missing map $15 Ceasar and the Lunch Lady $10 Suzie and the Bad Kids $13.95 Beehive $12 movies.txt with all possible movies: The Adventures of a Babysitter $10 Barney $25 Larry the Car Man $15 Dora and the missing map $15 Ceasar and the Lunch Lady $10 Suzie and the Bad Kids $13.95arrow_forwardTask 5: Unscramble You will write a program that takes in 2 files: a dictionary file and a file listing jumbled words. Your binary will be called unscramble and will be run using unscramble The file contains a bunch of scrambled words, one word per line. Your job is to print out these jumbles words, 1 word to a line. After each jumbled word, print a list of real dictionary words that could be formed by unscrambling the jumbled word. The dictionary words that you have to choose from are in the file. As an example, the starter package contains two sample input files and the result should look as follows. The order that you display the dictionary words on each line can be different; however, the order that you print out the jumbled words should be identical to the order in your input. The sample out below is skipping a few lines to save handout space (your output must not omit these lines). nwae: wean anew wane eslyep: sleepy rpeoims: semipro imposer promise ettniner: renitent.…arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY