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:
- Each student in class has these attributes:
- Last name
- First name
- Student number
- Grade for midterm #1
- Grade for midterm #1
- Grade for final
- Prints the list of all students in the class on screen
- Prints the list of students in alphabetical order of their last names using MergeSort
(If two or more students have the same last names, the program will sort based on their first names)
- Enables the user to add more students to the list
- Calculate the letter grades of all students based on the following rule:
- A: For an average higher than 90%
- B: For an average between 80%-90%
- C: For an average between 70%-80%
- D: For an average between 60%-70%
- F: For an average below 60%
- User can set the percentage that each of the midterm and final grades contribute to the average grade of students
(By default there is 25% for midterm #1, 25% for midterm #2, and 50% for the final grade)
- User can search for a student (using Binary Search) and change student's information or remove the student (or all students) from the system
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: