hamburger-icon

C++

Data Structures Sorting

This assignment was using different sorting algorithms, specifically Bubble Sort, Insertion Sort, Merge Sort, Quick Sort, Selection sort, and most fun of all, External Merge Sort. When you run the program it asks you to enter a size, using that size it will run through all the mentioned sorts except External Merge, which can be triggered by entering 20000X. If you enter 1000W it will write all the sorted arrays to .csv files allowing you to view them sorted. They are on located on github with the project.

Sorted All

The algorithms all fell within or slightly above the expected sorting speed. Below you can see the output of running external merge sort, followed by the writing of all files.

External Merge Sort

The external merge runs in such a quick period due to closing files after it was completed, .close() takes a fair bit of time, so it slows down the sort by seconds. If you look at the code below only three of the sorts are found, the rest are on github.

TicTacToe

Tictactoe was made in c++, it had an unbeatable AI, including a number of tests done by the instructor, David Russell. The AI, was a script that went through series of moves based on how you played.

TicTacToe

The AI was able to stop forks, of all sorts, and was also able to play offensively while playing, so it would beat the player if not presented with a fork. Below is a full game played, where the AI stoped a fork from happening by playing two in a row.

TicTacToe

Below in the code section is the full logic of the 'AI'.

Fraction Calculator

The fraction calculator involved overloading the ios stream, and various other functions, such as +, -, <, and >. The program highlighted regex, and overloading operators to complete the assignment.

Media Player GUI

The Calculator could take in two fractions, including whole numbers and do operations on them, such as addition, subtraction, multiplication and division.