A Simple Java Program

Completado Publicado Nov 1, 2011 Pagado a la entrega
Completado Pagado a la entrega

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.

Java

Nº del proyecto: #1273220

Sobre el proyecto

1 propuesta Proyecto remoto Activo Nov 1, 2011

Adjudicado a:

deadhunt

Please check PMB.

$30 USD en 0 días
(34 comentarios)
4.7