Write a program that prompts the user to enter one of the filenames described in Programming Exercise
Question:
Write a program that prompts the user to enter one of the filenames described in Programming Exercise 12.31 and displays the names that are used for both genders in the file. Use sets to store names and find common names in two sets. Here is a sample run:
Transcribed Image Text:
Enter a file name for baby name ranking: babynamesranking2001. txt erter 69 names used for both genders They are Tyler Ryan Christian
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 71% (7 reviews)
import javautilScanner import javautil import javaio public class Exercise2112 public ...View the full answer
Answered By
Stephen ouma
I have worked with different academic writing companies such as wriredom, writerbay, and Upwork. While working with these companies, I have helped thousands of students achieve their academic dreams. This is what I also intend to do here in SolutionInn
4.90+
19+ Reviews
63+ Question Solved
Related Book For
Introduction To Java Programming And Data Structures Comprehensive Version
ISBN: 9780136520238
12th Edition
Authors: Y. Daniel Liang
Question Posted:
Students also viewed these Computer science questions
-
Write a program that prompts the user to enter three strings. Compare the String objects lexicographically and print the middle-valued string. For example, if the three strings were "abcd", "wxyz",...
-
Write a program that prompts the user to enter two characters and displays the major and status represented in the characters. The first character indicates the major and the second is number...
-
Write a program that prompts the user to enter two strings and displays the largest common prefix of the two strings. Here are some sample runs: Enter the first string: Welcome to C++ Enter the...
-
Part C A 100.0 ? and a 150.0 ? resistor, both ratedat 2.00 W, are connected in series across a variable potentialdifference. What is the greatest this potential difference can bewithout overheating...
-
Assume that the height of an American female is Normal with expected value = 64 and standard deviation = 2.5. a. What is the probability that an American female's height is 66 inches or taller? b....
-
D E B 2.9 2 B 3.15 2 C 3.29 14 C 3.5 2 B 2.6 3 B 3.64 8 B 2.2 10 C 3.25 0 B 2.2 15 C 2.55 5 C 3.5 0 B 3 6 C 3.4 5 B 3.2 15 A 2.23 4 B 3.15 4 C 2.75 3 C 3 12 B 3.3 14 B 3.1 20 C 3.1 1 B 2.85 2 C 2.5 3...
-
E 5-2 [Based on AICPA] General problems 1. Pop, Inc., owns 80 percent of Son, Inc. During 2016, Pop sold goods with a 40 percent gross profit to Son. Son sold all of these goods in 2016. For 2016...
-
Ariana Peterson recently opened her own law office, which she operates as a corporation. The name of the new entity is Ariana Peterson, Attorney. Peterson experienced the following events during the...
-
* What are good options to consider in regard to rewarding workers for good performance when raises are not feasible? Target pay increases to poorer performing employees to increase their job...
-
1. Using the Malin's Makeovers QuickBooks data file (Malin.qbw or Malin), record entries for the source documents for February. If you have completed the source documents using this company in the...
-
Write a program that converts a Java file into an HTML file. In the HTML file, the keywords, comments, and literals are displayed in bold navy, green, and blue, respectively. Use the command line to...
-
Use the data files from Programming Exercise 12.31 to write a program that enables the user to select a year, gender, and enter a name to display the ranking of the name for the selected year and...
-
Using the same information in Cornerstone Exercise 7-23, assume that Advanced Technological Devices amortizes the patent on a straight-line basis over its remaining economic life of 12 years....
-
how could playing in a sandbox help to the development of children? how could a garden help to the development of children? how could playground obstacle courses like a pebble bridge and monkey bars...
-
A store order bottles of shampoo throughout the year. Over time, the store has learned that the annual demand D for shampoo is constant, i.e., there is no variability. Currently, the store decides to...
-
Solve the Practice #2 == where L2 =02A = a, L404B = c, L = 0204 = d, y = /2 1) Find the velocity 3 when 82 = /2 and 6 = 0.4 rad/s 2) Find the acceleration 63 when = /2 and 62 = 0.4 rad/s 03. 03 Y B...
-
.0.5 0.5 For the above plot of the ellipsoid (22) 2- + +() + (-) = 1, find the parameters a, b and c. Note that a, b and c are positive integers between 1 and 6 inclusive. Use the mouse to rotate the...
-
The annual energy consumption of the University of Maryland is 100 million kWh. How much Uranium-235 is needed to produce this amount of energy in a nuclear power plant assuming 100% efficiency? (The...
-
Two products G and H are created from a joint process. G can be sold immediately after split-off. H requires further processing into product HH before it is in a saleable condition.There are no...
-
Which of the following gives the range of y = 4 - 2 -x ? (A) (- , ) (B) (- , 4) (C) [- 4, ) (D) (- , 4] (E) All reals
-
Rewrite the fib method in Listing 18.2 using iterations. To compute fib(n) without recursion, you need to obtain fib(n - 2) and fib(n - 1) first. Let f0 and f1 denote the two previous Fibonacci...
-
Using the BigInteger class introduced in Section 10.9, you can find the factorial for a large number (e.g., 100!). Implement the factorial method using recursion. Write a program that prompts the...
-
Implement a class named BitOutputStream, as shown in Figure 17.22, for writing bits to an output stream. The writeBit(char bit) method stores the bit in a byte variable. When you create a...
-
Which of the following statements regarding traditional cost accounting systems is false? a. Products are often over or under cost in traditional cost accounting systems. b. Most traditional cost...
-
Bart is a college student. Since his plan is to get a job immediately after graduation, he determines that he will need about $250,000 in life insurance to provide for his future wife and children...
-
Reporting Financial Statement Effects of Bond Transactions (please show me how you got the answers) Lundholm, Inc., which reports financial statements each December 31, is authorized to issue...
Study smarter with the SolutionInn App