Java Programming - Both Baby Names - Write a program that reads “babynames.txt” and prints all boy and girl names that match
    Java Programming - Both Baby Names - Write a program that reads “babynames.txt” and prints all boy and girl names that match

Java Programming - Both Baby Names - Write a program that reads “babynames.txt” and prints all boy and girl names that match

$10.00

Please zip all of the programs (.java files only) below into one folder saved as JavaPrograms3. For all problems:

Use Scanner for input and println/printf for output. No GUI dialog boxes.

1. Write a program that reads “babynames.txt” and prints all boy and girl names that match. Example line from “babynames.txt”:

1 Michael 462085 2.2506 Jessica 302962 1.5436 Each line of this file “babynames.txt” has a first name(boy) and a second name(girl. Ignore all numbers in each line and read only the names. There are 1,000 boy names and 1,000 girl names(one of each on every line for a total of 1,000 lines.

The program should read the names and compare them. All matching boy and girl names should be printed out by the program. • Let the user enter the file name from the keyboard. • Use Java 7 NIO.

Output should look similar to below.

Sample Run (partial run): Enter the file name: babynames.txt Tyler Ryan Jordan Christian Cameron Â… Tayler Ashley Notes/Hints/Tips:

 Use the example Java program (UppercaseFileConverter.java) to help with the use of Java 7 NIO. Name the program: BothBabyNames.java.

Tutorial contain java program, and A++ work and very detail comments.

Attached Files

Move over [ preview ] file name to preview content in it!

  • BothBabyNames.zip [82.5KB]
    • babynames.txt [49.4KB] [ preview ]
    • BothBabyNames.java [2.3KB] [ preview ]
    • BothBabyNames_screenshot.jpg [30.8KB]

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



Tags: Java
PURCHASE SAVE
2 Tutorials 10%
3 Tutorials 13%
4 Tutorials 16%
5 Tutorials 19%
6 Tutorials 22%
7 Tutorials 25%
8 Tutorials 28%
9 Tutorials 31%
10 Tutorials 34%
add url more

9MZQASHWN73B