Discover
Questions library
Collections library
Find online teacher
login
Discover
questions library
Find online teacher
login
Popular searches:
if-else
class-diagram
flowchart
Polymorphism
Home
Questions
Questions
Study lists
Asmaamasry Questions
705 Questions
(Name for both genders) 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:
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
276
(Baby name popularity ranking) Use the data files from Programming Exercise 12.31 to write a program that enables the user to select a year, gender,
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
176
(Count the occurrences of each keyword) Rewrite Listing 21.7 CountKeywords. java to read in a Java source code file and count the occurrence of each keyword in the file, but don’t count the keyword if it is in a comment or in a string literal
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
198
(Guess the capitals using maps) Rewrite Programming Exercise 8.37 to store pairs of each state and its capital in a map. Your program should prompt the user to enter a state and should display the capital for the state
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
173
(Count the occurrences of words in a text file) Rewrite Listing 21.9 to read the text from a text file. The text file is passed as a command-line argument. Words are delimited by whitespace characters, punctuation marks (,;.:?), quotation marks (\'\"), and parentheses
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
275
(Revise Listing 21.9, CountOccurrenceOfWords.java) Rewrite Listing 21.9 to display the words in ascending order of occurrence counts
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
190
(Count the occurrences of numbers entered) Write a program that reads an unspecified number of integers and finds the one that has the most occurrences
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
222
(Syntax highlighting) 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 pass a Java file and an HTML file. For example, the following command
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
277
(Count consonants and vowels) Write a program that prompts the user to enter a text file name and displays the number of vowels and consonants in the file. Use a set to store the vowels A, E, I, O, and U
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
191
(Count the keywords in Java source code) Revise the program in Listing 21.7. If a keyword is in a comment or in a string, don’t count it. Pass the Java file name from the command line. Assume that the Java source code is correct and line comments and paragraph comments do not overlap
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
234
(Display nonduplicate words in ascending order) Write a program that reads words from a text file and displays all the nonduplicate words in ascending order. The text file is passed as a command-line argument
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
161
(Perform set operations on hash sets) Create two linked hash sets {\"George\", \"Jim\", \"John\", \"Blake\", \"Kevin\", \"Michael\"} and {\"George\", \"Katie\", \"Kevin\", \"Michelle\", \"Ryan\"} and find their union, difference, and intersection. (You can clone the sets to preserve the original set
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
132
(Evaluate expression) Modify Listing 20.9 EvaluateExpression
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
361
Total:
705
Previous
40
41
42
43
44
Next
Go