CX 103 : Introduction to Computers

Assignment 23

Due: Monday, April 16
 

Reading



Review all the assigned readings in Deitel, Deitel & Nieto, Internet & World Wide Web: How to Program and in Freiberger and Swaine, Fire in the Valley: The Making of the Personal Computer.
 
 

Writing Exercise

Prepare 3 or 4 thoughtful discussion questions based on the readings in Chapters 5 - 8 of Fire in the Valley. These should be sent to me via email before midnight on Sunday.
 
 

Programming Exercise

This JavaScript exercise may provide a review of many (but certainly not all!) of the features of JavaScript we have been studying. Your assignment is to put together and extend several of the programs that have been presented in class or that have been assigned in earlier homework exercises.

Your program should ask the use (via a form) to enter a word or a short phrase. The program should first determine if the user's input has an odd or an even number of characters. If it has an odd number, then the program should stick on the character "X" at the end.

The program should then take each successive pair of characters, transform them into the four digit integer built from the ASCII values of the characters (as in Encrypt1.html). Then your program should proceed to add 7 % 10 to each digit and swap the resulting outer digits and the inner digits as before. The output of the program (which will appear in a window in the form) will be a sequence of four digit integers, one integer for each pair of characters in the user's input.