In Progress

A Simple Java Program

Write a program that prompts the user to enter the name of

an input text file.

If the file cannot be open, the program prints an error message and

exits.

Otherwise, the program prompts the user for the name of

the output file. If the output file cannot be opened, the program

prints an error message and exits.

Otherwise the program processes every line of the input file as

follows. If the input line has two strings like

Pepe Garcia

the program writes the line

P. Garcia

on the output page.

If the input line does not have 2 words ( it may be 0, 1, 3, or more)

the program prints the contents of the line on the [url removed, login to view] file

and states that this file does not have the format word1 word2.

This file reads a file of names of the form

FirstName LastNames

It copies the initial of the first name and

the last name on the output file as shown below.

FirstNameInitial. LastName

If the input line does not have 2 words, it is displayed on the monitor

as an error.

Use the provided files to test the program.

Skills: Java

See more: program line, write a simple, simple c# program, simple c program , java monitor, garcia, program output, open input file, message simple text, java program simple, system format java, java text message, java test program, write java file program, test program, file system java, java simple file input, simple java file output, java format, test simple, input output strings java, java initial, java output file, program open text files java, line java

About the Employer:
( 9 reviews ) Immokalee, United States

Project ID: #1273220

Awarded to:

deadhunt

Please check PMB.

$30 USD in 0 days
(34 Reviews)
4.7