Program Five

Write a program that reads in a simple sentence, counts the words, prints the sentence out backwards and forwards, and prints the words in alphabetic order.

For the purposes of this program, a sentence is a string of words, where the last character of the last word is a period. The sentences should come from the standard input stream.

The program should exit when the single word sentence EXIT. is typed.

For this program, the data MUST be stored in a linked list.

For this program, the print routines must be recursive.

For this program, the count routine must be a recursive routine that counts the number of elements in a linked list.

  • For this program, you must write a routine that takes an ordered linked list and constructs an ordered linked list. The insert_into_order_list routine must be recursive.

    Please make sure that you use good programming practices, that your program is well documented, and takes advantage of modular compilation. Please make sure that your code is well structured and easy to read.

    When you are finished, please create a web page containing links to your files as well as a tar file of the entire project. Make a README file that describes the project and any items of interest. Send an email message with the URL to this page to your instructor.