Behnam Azizi


These are some of the programs that I developed in assignments and projects using C++:

Student Infromation System



We did parts of this program as an assignment in the course CMPT 128. Later I developed the program further and added more features to it. This is a program that stores information of the students in a class and enables user to manipulate the data regarding each student. The program has the following features:
      1. Last name
      2. First name
      3. Student number
      4. Grade for midterm #1
      5. Grade for midterm #1
      6. Grade for final
      1. A: For an average higher than 90%
      2. B: For an average between 80%-90%
      3. C: For an average between 70%-80%
      4. D: For an average between 60%-70%
      5. F: For an average below 60%
The information of the students is stored on the hard-drive so even after closing the program/turning off the computer the data will not be lost.
Download mySIS (could be run in Linux Terminal if G++ installed)

Word Frequencies (Assignment on Hash Tables)



This program read the contents of a text file and prints out the number of times each word in the file is repeated. The way this works is that each time a new word is found it stores it in a Hash Table, and if the word was previously added it increments the key value of that word by one. We did the hashing part of this program in an assignment. The driver program was provided by Prof. Greg Mori. It uses double hashing to probe words that have the same hash value. The default hash function is the following:
i0*(32n-1) + i1*(32n-2) + .... + in-1*321 + in

For example for the word "CAR" we get the following hash value:
3*(322) + 1*(321) + 18 = 3122
Download word_frequencies (could be run in Linux Terminal if G++ installed)

Secret Decoder (Self-Directed)


I developed this program during my pastime. This simple and interesting program converts the contents of a text file into a secret coded message which can be converted back into readable text again! It reads a text file character by character and converts them into weird (but predefined) characters. Here is a screenshot of how the text message looks like before and after conversion:
Here is how a text is converted into a secret code:


And finally, the message written in secret language can be converted back into readable text!
Download Decoder (could be run in Linux Terminal if G++ installed)

Matrix Operations



This is the most recent program that I developed using C++. Program runs based on the following procedure:
  1. User enters the number of rows and columns of the m*n matrix
  2. Users enters the item in row i and columns j of the m*n matrix for ∀i and j, where 0 ≤ i ≤ m and 0 ≤ j ≤ n
  3. The program prints the matrix on screen
  4. The program prints the menu showing the operations that could be done on the matrix
that is capable of doing the following operations on ANY n*n matrix:
det(A) = ai1Ci1 + ai2Ci2 + ai3Ci3 + ... ainCin

Where Cij is the determinant of the cofactor matrix created when removing row i and column j from the matrix, and ai1 is the element in row i and column j of the matrix. Using the above formula the determinant of any n*n matrix can be defined in terms of the determinants of (n-1)*(n-1) matrices. And the base case for induction is when n=2 (a 2*2 matrix), where the determinant can be evaluated easily.
Download matrix (could be run in Linux Terminal if G++ installed)