Due: Mon Sep 14 2015 at 11:59pm in your Github repo for project1 (I will provide the repo).
This is a Python warm up project. You are going to implement a Hamming Code encoder, decoder, error finder, and error corrector in Python.
See this page for details on the Hamming Code calculation: http://users.cs.fiu.edu/~downeyt/cop3402/hamming.html
You should write a Python program called hamming that accepts the following command line arguments:
$ python hamming.py <type> <command> <arg1> <arg2>
Where <type> is one of:
Where <command> is one of:
$ python hamming.py asc enc hello.txt hello.asc
Will encode the ASCII file into a hamming code version of the file in which each character is a '0' or a '1'. You can assume you will encode 8 bit values.
Using the ASCII encoding keeps things simple while you are developing your hamming code algorithm.
The Binary encoding is more compact as the resulting encoded file will be binary data instead of ASCII data. However, you will need to use bitwise operators to build up your result file.
You should structure your program using Python classes in order to reuse as much code as possible. Also try to use as much functional style programming as possible. See:
You can break down your program into multiple files.
You will need to write test code for your solution.