C l2 - Hands-On Assignment
C l2 - Hands-On Assignment
TOC:
Min No of
Sr. No. Topic Assignments
Assignment 1:
Expression evaluator
This assignment is for people to understand the concept of stack/tree/graph operations and
programming.
-10+20*8-90/2
(-10+20)*8-90/2
-10
+5
Assignment 2:
This assignment is for a C++ developer at L1 level to get an understanding on how to use files, encryption
and decryption through CIPHERS. This also helps the developer to understand how to use sockets in C++
programming.
This assignment is for the C++ developer who wants hands-on experience on implementing a case study
PROBLEM STATEMENT
Design and develop an object-oriented program in C++ to implement a symmetric key based security
system (which uses a single key) for both encryption and decryption of a message in a secured
communication. The user encrypts the message to be sent and this encrypted message must be sent over
the communication network. At the receiving end, the intended receiver would get the encrypted
message and decrypt it.
REQUIREMENTS
3) Read the character from the given plaintext and if message ends
goto step 7.
Goto step 3
a) Search for the key alphabet having the lowest ASCII value in the first location
of each array and transfer the contents of the array from the second location
into ciphertext
b) Set the first location of the selected array to some large value.
5) Stop
Choose an appropriate key and should communicate secretly to your recipient. The
program should include
i) class definition(s) in a separate header file.
Assignment 3:
Eight queens are to be placed on an 8x8 chess board in such a way that no queen checks against
any other queen. No two queens should be in the same column or same row or same diagonal.
No two queens should be in the adjacent position.
Create a two dimensional array. Presence of queen in a cell should be indicated by putting 1 in
the corresponding position in the array. Similarly, absence of queen to be indicated by putting 0
there.
Assignment 4:
A semi-conductor wafer manufacturing company has an automated robotic machine to process the
wafers.
Assignment 5:
Input specifications:
The input will be a single line containing an integer N, followed by N integers. Assume N
< 50.
Output specifications:
You have to print the content of the array X each time partitioning is done. The output
should be on a single line containing the array elements separated by a space.
Input
8 25 57 48 37 12 92 86 33
Output
Explanation
25 12 33 37 48 57 92 86 sort(0,7) UP = 3 X[DOWN] = 48, X[UP] = 37
12 25 33 37 48 57 92 86 sort(0,2) UP = 0 X[DOWN] = 25, X[UP] = 12
12 25 33 37 48 57 92 86 sort(1,2) UP = 1 X[DOWN] = 33, X[UP] = 25
12 25 33 37 48 57 86 92 sort(4,7) UP = 5 X[DOWN] = 86, X[UP] = 57
12 25 33 37 48 57 86 92 sort(6,7) UP = 6 X[DOWN] = 92, X[UP] = 86