Question: I need to know how to do this without using an array. An example of a way it has been suggested to do it is

I need to know how to do this without using an array. An example of a way it has been suggested to do it is using a Boolean with an int count. An expert before this answered my question but used an array which I cant use.

The book is building java programs 4th edition. It is chapter 6 project 4. I just need to know how to do this following the instructios in the picture where when name the and year how many times the name was used. And the solution cant be using an array.

I need to know how to do this without using an array.

The question regarding this problemis a ttle different then what the solution for the book is. As the second picture states instead of producing a name with the number for each decade I have to be able to allow the user to plug in a name and a year and my code report back a number. He is also providing us a separate file that the code will pull from to get this info. The textbook name is building java programs 4th edition by Stuart Reyes and Marty step. Write a program that reads a file containing data about the changing popularity of various baby names over time and displays the data about a particular name. Each line of the file stores a name followed by integers representing the name's popularity in each decade: 1900, 1910, 1920, and so on. The rankings range from 1 (most popular) to 1000 (least popular), or O for a name that was less popular than the 1000th name. The following lines are a sample of the file format: Sally 0 0 00000000886 Sam 58 69 99 131 168 236 278 380 467 408 466 Samantha 00000 0 272 107 2657 Samir 0 0000000 920 0 798 Your program should prompt the user for a name and search the file for that name: This program allows you to search through the data from the Social Security Administration to see how popular a particular nane has been since 1900. Nane? Sam If the name is found, the program should display data about the name on the screen Statistics on name "Sam 1900: 58 1910: 69 Write a Java program for project 4, chapter 6, page 441. Write the following method that returns the statistic for a given name in a given decade: public static int statistic( String name, int decade) For example, in the example given in the text, statistic( "Sam", 1900) would return 58. (I will work

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!