Second Java assignment: Simple text to HTML translator
In this assignment you are to write a Java application that reads in text from a file, translates it to (very simple) HTML, and writes it out to a second file. You do not need to know any HTML beyond what is described in this handout. This assignment is primarily an exercise in using Java I/O, plus a little string manipulation.
Your Java application should get the name of the text file to be processed from the command line. The name of the output file should be the same as that of the input file, but with a .html extension (or .htm, if you have only 8+3 filenames).
Your application should simply copy the input file to the output file, with the following modifications:
Translate |
|
---|
You should be able to check your output by viewing it in any Browser.
Here's the HTML you need:
<html> <head> <title>Your title line goes here</title> </head> <body> <h1>Your header goes here</h1> Your text goes here and may consist of many lines. </body> </html>
Please turn in: