Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

Programming Assignment

1. Purpose of the Programming Assignment:

The students are being asked to attempt the programming assignment as


this would give them the opportunity to demonstrate their overall
understanding of the software development, which does not come out
only with Multiple Choice Questions.

2. Evaluation Criteria:
1. Design Approach, including the ability to make right
assumptions and meaningful considerations.
2. Implementation which would include, but not limited to:
1. Functional Completeness
2. In Code Documentation
3. Optimization
3. Testing and Debugging approach
1. Unit Test Case considerations.
2. Approach towards Debugging
3. Documentation of results.

3. Problem Statement - Implementation of a private security


algorithm.

The objective of this assignment is to implement a encryption algorithm


for secure transfer of a file. The students are required to write a program
which would implement the following:

1.There would 2 processes - an encryptor process and a decryptor


process,
2.The encryptor process would be started with arguments Key and
Filename.
3.The decryptor process would be started using the key as the
argument.
4.The encryptor process would read the file and encrypt using the
following algorithm:
1. The letter at position of the key or a multiple of key is
interchanged with the next letter. Spaces and special characters
are to be ignored. If the letter is the last one in the file, then no
interchange is required.
2. All letters in the words which did not got changed as part of
step 1 above are subjected to replacement by mirroring letters, ie.
A replaced with Z, B with Y and so on.

5. The encryptor would print encrypted text to standard output, as well


as save the same to the current directory as enc<Filename> , where
Filename is the name of the original file that was encrypted.
6. The program would transfer the encrypted file to the decryptor
process using IPC mechanism.
7. The decryptor process waits to receive data from the encryptor
process and on receiving the same, dumps the encrypted data and
decrypted data.
8. It also writes the decrypted data as decFilename , where Filename
is the name of the original file that was encrypted.

Example of Encryption

Let us say that we supply a file called SecretOfTalaash, which contains


the text "The suspense of Talaash is that Kareena is a ghost who does all
the killings" and the key to be used is 4.

Here, the forth letter is “s”, which is replaced with next one, i.e. “u”, the
8th letter is “p”, which would be changed with next letter i.e. “e” and so
on. So after making this change the sentence would look like:

The suspense of Talaash is that Kareena is a ghost who does all the
killings

The usspnese fo Taalahs is taht Kraeean is g ahost whd ooea sll teh
kililngs.
Now while these changes were done, the words that did not get changed
are:

The, is, is

On Mirroring, the resultant text would be:

Gsv usspnese fo Taalahs rh taht Kraeean rh g ahost whd ooea sll teh
killings

4. Guidelines
 The problem statement would be made available to the students who would be appearing
for the selection process of Happiest Minds, 3 days in advance of the Happiest Minds
visit.
 The students are supposed to individually attempt the problem and have the solution
ready.
 This is an “Open Book” exam – i.e. students can refer books, net etc while doing the
assignment.
 Each student should have his / her distinct implementation available for review. The
college should have a system that would be available to panel members to review the
implementation and also do testing if needed.
 The selection process would include VIVA on the assignment for students shortlisted by
the written test that would be conducted on the day of the visit.

You might also like