Programming Assignment 07


Due: Week of Oct. 24 in lab


  1. Write a library for encrypting and decrypting a message with a shift cipher (Caesar cipher). A shift cipher encodes a message by replacing each letter with a corresponding letter up or down by a specific amount in the alphebet. Write two clients for the library to aid a user in (1) encrypting a specific message and (2) decrypting an encoded message. Remember - BREAK THE PROBLEM DOWN INTO PIECES TO MAKE IT EASIER. Worth 60 pts. Messages are assumed to be upper case!
    Details for the library:
    Details for the encrypting client:
    Details for the decrypting client:
    Examples:
  2. Write a program using a recursive function that reverses a String. The String is input as a command-line argument and output to the terminal in the main function. Name the file and program ch2sec3prob00.java. Worth 20pts. Use only length(), substring(), and charAt() from String. The recursive function is ~3 lines of code and main is ~1 line of code.
    Examples:
  3. Write a program using a recursive function that outputs the binary representation of an integer. The integer is input as a command-line argument. Name the file and program ch2sec3prob01.java. Worth 20pts. The recursive function is ~6 lines of code and main is ~2 line of code.
    Examples: