Computer Science 202 Programming Assignment 4 Assigned: March 17, 1999 Due: April 1, 1999 I'm sure that all of you have used the World-Wide Web. Web pages are written in a language called HTML (Hyper Text Markup Language). Your programming assignment lets you work with simple HTML files. Display a main menu of options from which the user may select again and again in any order. If the user doesn't select a correct option, make the user select again. The options are as follows: 1. Given the name of a text file, with the following format, name of word/place at most 50 characters, terminated by \n description at most 100 characters, terminated by \n construct a set of Web pages corresponding to them. You will need to build a binary search tree from the entries to help in constructing the set of Web pages. The Web pages will have the following format: name of word/place centered and in bold text the description in a paragraph a picture corresponding to the word a link to the parent file, if present links to the children files, if present You will also need to create a root Web page, which has a link to the Web page corresponding to the item stored in the root of the tree. 2. Quit the program. Samples of input and output files are given below. Sample text file (test1.txt): Hungary The capital of Hungary is Budapest. Hungary is located in the heart of Europe. Greece The capital of Greece is Athens. It borders Albania. Nigeria The capital of Nigeria is Lagos. It is in Africa. Sample output files: test1.html:
Hungary Hungary.html:
The capital of Hungary is Budapest. Hungary is located in the heart of Europe.
Left: Greece
Right: Nigeria Greece.html:
The capital of Greece is Athens. It borders Albania.
Up: Hungary Nigeria.html:
The capital of Nigeria is Lagos. It is in Africa.
Up: Hungary