Homework 4, Coded Messages.

Short Description:

Write a program that encode and decode messages.

This assignment is worth 40 points.

Goals

When you finish this homework, you should have:

Formal Description

Write a program that can encode and decode messages using a number of different cipher algorithms.

Your program should open the files codes.dat which will contain a series of messages, along with instructions on how to transform these message.

The format of the file is as follows

The possible codes are

An example of the input file could be
encode shift 23
1
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
decode shift 23
1
QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD
encode combine LEMON
1
ATTACK AT DAWN
decode combine LEMON
1
LXFOPV EF RNHR
encode altCombine ALBERTA
2
CALGARY
Attack At Dawn
decode altCombine ALBERTA
2
CPMCRYY
Aiuwtr At Ozaw
In the following descriptions