] >
Write a program ‘Uni.java’ that prepares a HTML file ‘uni.html’ showing 80 consecutive unicode characters. The characters should be displayed within a table of 10 rows by 8 columns. The program should get for an input a file ‘in.txt’ with the decimal number of the first unicode character in the sequence.
Notes.
The following example illustrates how a HTML page can display a table.
|
<html>
<head> <style type=’text/css’> td{ padding : 5pt; } table[rules], td { border : solid black 0.4pt; } </style> </head> <body> <table rules="groups"> <tr> <td>@</td> <td>A</td> </tr> <tr> <td>B</td> <td>C</td> </tr> </table> </body> </html> |
Suggestion. Build your program incrementally in the following manner.
Have the program print the following parts using just System.out.println instructions.
That is, the program should be a larger variant of the following program.
Check with a browser that the obtained file provides the following outcome.
| @ | A |
| B | C |
Instead of having the constant 64 hard coded within the program, have the Java program read an integer from the input file.
Note that a loop can be used to process the different digits. For instance, a conversion of an input string 64 into an integer value can be as follows.
(’6’ - ’0’) * 10 + (’4’ - ’0’)
Posting web pages. Web pages can be posted in the following manner on the CSE site.
Create at the root directory a subdirectory named WWW.
mkdir ~/WWW
Note that WWW should be in uppercase letters.
Make the WWW directory globally accessible.
chmod 711 ~/WWW
Copy the HTML file to the WWW directory.
cp uni.html ~/WWW/.
Make the HTML file globally readable.
chmod 644 ~/WWW/uni.html
The URL for the web page will be
http://www.cse.ohio-state.edu/~your-user-name/uni.html