/Assignments

A repository holding many, if not most, of the programming assignments I completed throughout my academic career.

Primary LanguageJava

Table of Contents


Assignments

In this repository, you can find a compilation of most of the programming assignments that I have completed over the span of my (not-yet-completed) academic career. Please use this README file to browse through the repository, as I have tried my best to make the list as comprehensive as possible. I have hyperlinked the assignments to their respective location in this folder, and I have also included brief descriptions for each assignment and course. I hope that this reposity will br able to give you an idea of my progression as a developer.


##

McGill University

Bachelor of Software Engineering at McGill University. To view the curriculum, please click here.

##COMP 206 - Software Systems

"Comprehensive overview of programming in C, use of system calls and libraries, debugging and testing of code; use of developmental tools like make, version control systems."

###Assignment 1 

The purpose of this assignment was to get us accustomed to writing BASH scripts. The second part of the assignment consisted of writing a script that would endlessly open a given list of images in a certain order until manually interrupted. If an image is closed, the script has to reopen it. The third part was about sorting animals according to the attributes specified by the user (weight, length, alphabetical). Two outputs had to be produced: one with a sorted list of animal names and another one with a sorted list of images.

###Assignment 2  

This assignment was an introduction to C and it allowed us to explore the way the language interacts with the Linux terminal. The first question translates a date piped as an argument from the shell to a given input language. The second question was an exercise in ASCII art. It prints a the calendar for a year in different languages given a starting day offset and a maximum number of characters to print out.

###Assignment 3  

In this assignment, we explored C's dynamic memory allocation in depth. Part A of the first question was about decrypting files encoded with the Caesarean cipher algorithm, provided the correct key. Part B of the first question cracked down the key of an encrypted text. The second question is an implementation of a simple chat, where two users interact through two different terminal windows. The third question combines the concepts from the two questions above to create an encrypted chat client.

###Assignment 4  

The pedagogical objective of this assignment was to "[learn] basic Python programming skills in domains where Python is effec-tive, and especially as applied to problems that would be difficult in C." The first question counts each occurrence of the words from a given input file. The second question counts each word pair in a given text. [The third question] implements a very primitive chatbot which constructs its answer based on word associations from one or several input files.

###Assignment 5  

The pedagogical objective of this assignment was to "[implement] a larger software system that includes components from the web, C libraries written by others, as well as [my] own code written in Python in order to produce a functional integrated system." In the first question, we had to write a Python program with the use of ctypes which would apply filters to an input image. Then, the second question extended the functionality of the first question by implementing an operation history with the help of Python's pickle module, which allowed the user to load, undo and redo filter applications for a given image. The third question was simply an implementation of the same program, but adapted to Python CGI. A running web version can be found here.

##COMP 250 - Introduction to Computer Science "An introduction to the design of computer algorithms, including basic data structures, analysis of algorithms, and establishing correctness of programs. Overview of topics in computer science."

For the most part, the assignments for this class were in written form, although the ones below included parts in which we had to do some coding.

###Assignment 1  

In this assignment, the programming part consisted of solving list-intersection problems by implementing four different algorithms, one which relied on nested for-loops, another one that used binary search, another one which was based on a sort-first approach with parallel pointers, and finally another one that used the merge-and-sort technique. Then, we had to compare the running times of each algorithm in order to familiarize ourselves with the big O notation.

###Assignment 2  

The point of this assignment's programming part was to empirically demonstrate that iterative functions are much more efficient than recursive ones. We were asked to write an iterative method which computes the factorial of a number, and then two methods, one recurisve and one iterative, which respectively allow for the computation of the input's binomial coefficient. Of course, all of these methods were benchmarked afterwards.

###Assignment 3  

The programming question of this assignment presents a version of the [Merge sort algorithm] (https://en.wikipedia.org/wiki/Merge_sort) which mimics recursion by implementing a stack to keep track of the value of variables during the execution of recursive methods, in the same way that the Java Virtual Machine does it.

###Assignment 4  

For the first question of this assignment, we were asked to complete two methods, one which evaluated a symbolic expressions, and another one which returned the derivative of a given symbolic expressions. The purpose of this assignment was to familiarize us with trees as an abstract data type.

###Assignment 5  

I found the programming part of this assignment to be the most challenging of the course, but at the same time the most interesting; this same sentiment was shared by several of my classmates. In short, this program is a web search engine which was designed to imitate Google's PageRank algorithm. It performs graph traversals on McGill School of Computer Science's website with the use of the depth-first search algorithm, and also provides a method which computes the page rank of each vertex in the aforementioned grap, among many other things.

##ECSE 211 - Design Principles & Methods

A course on -- as its name aptly betrays -- design and documentation in which we had to write an exhaustive amount of paperwork, but we also got to build robots using Lego Mindstorm kits and the Lejos API. This is the most dreadful course McGill's ECSE department has to offer. Below you can find the code for each different robot we had to build. The greater chunk of the course was allocated to building (but mostly documenting) a robot that would peform in a final competition. The source code for the final robot can be found here.

###Lab 1  

In this lab, we were required to build a robot which would follow walls through means of two different techniques: Bang-bang control and Proportional control.

###Lab 2  

Here, we had to implement an odometer for the robot, in addition to an algorithm which would correct the readings on the odometer (and, consequently, the heading of the robot) with the help of a light sensor and black gridlines that were drawn on the floor.

###Lab 3  

In this lab, we had to implement a navigation functionality for the robot, i.e. a way of making it travel to specified coordinates. Furthermore, the robot had to avoid obstacles in its path while still keeping the correct heading.

###Lab 4  

The code in this lab accomplishes the task localization so that the robot can know its exact positioning relative to the competition floor. First, it performs an ultrasonic localization by retrieving the readings of the distances between itself and its adjacent walls in order to calibrate the odometer's angle relative to the competition floor. The robot then advances to the first intersection of two grid lines, reads four consecutive black line values and sets its new precise position relative to the board, i.e. the (0, 0) coordinate.

###Lab 5  

This lab could be considered a synthesis of the functionalities implemented in the previous four labs. We had to build a robot which would be capable of localizing, finding a blue Styrofoam block, picking it up and bringing it to a designated drop-off zone, all while ensuring that it avoids all obstacles in its way.

##ECSE 221 - Intro to Computer Engineering

This course introduces the student to the low-level facet of computers in general. Most of the assignments in this class were either written or concerned the design of combinational and sequential circuits with the very outdated Logicworks design tool.

###Assignment 1  

This program was my first exposure to the C programming language. Its purpose is very simple: it converts a given decimal number to its binary and hexadecimal equivalent.

###Assignment 4  

The second question in this assignment introduced us to the concept of function calls in the MIPS assembly language by writing code that, when executed, would return the factorial of a given input. The third question was slightly trickier, since we had to create a program which would evaluate expressions in the right order of operations.

##ECSE 321 - Intro to Software Engineering

The main objective of this course was "to introduce students to the process of software engineering". In this course, we also had a semester-long project in which we had to design a management system for food trucks. The source code to its Android implementation can be found here, and the source code to its Swing implementation can be found here. A lot of the assignments on this course focused on diagrams and written responses, though there was also a decent portion of programming involved.

###Assignment 1  

Here, we had to build an event registration application which allows the user to create participants and events, as well registering the created participants to the created events. The assignment was an introductory exercise to concepts such as unit testing, persistence and domain modeling, as well as the MVC architectural style. The program was built on multiple platforms, including Java Swing, Android and PHP.

###Assignment 3  

In this assignment, we had to apply the Strategy design pattern to a transaction program in which customers had three different ways of earning loyalty points.

###Assignment 5  

The purpose of this assignment was to make us understand how build tools work. Here, we were required to create a build.xml file using Apache Ant "to automate the software build process" for a source code that was provided to us. The build.xml had to create a build directory, compile the sources files, produce a .jar file, run all tests for the code, clean up and then execute the program.


##

Vanier College

DCS (DEC) in Computer Science & Mathematics from Vanier College. To view the curriculum, please click here.

##420-202 - Data Structures & Object-Oriented Programming

The main objective of this course was to cover topics in programming such as arrays, writing classes, inheritance, more advanced input/output, exceptions, recursion. It introduced the students to data structures emphasizing pointers and linked lists. A lot of content from this course overlapped with the COMP 250 class I took at McGill.

###Assignment 1  

In this assignment, we were asked to model an imaginary bag of a fixed number of things. This bag could contain anywhere from book titles to simple integers. Several manipulations could be casted on the contents of this bag: a bag can get, set, reverse, and print the items in the bag. I believe this assignment was intended to better make us understand arrays and objects.

###Assignment 2  

This assignment introduced us to key OOP concepts such as encapsulation, inheritance and polymorphism. We were asked to implement a simple banking system that consisted of two types of bank accounts: checking and savings. Both types differed in certian criteria but their overall behaviour was similar.

###Assignment 3  

The main purpose of this assignment was to let us gain experience working with Java's ArrayList and LinkedList classes. We were required to write an interactive program that allowed the user to create and manage a contacts list.

###Assignment 4  

This assignment tested us on our understanding of stacks and queues. We had to write a program that determined whether the brackets in a given expression were well-balanced, i.e. they are properly matched and nested

###Assignment 5  

In this assignment, we were able to further explore the concept of recursion. We were asked to implement recursive solutions to a given set of problems which included exercises such as writing a method that computed multiplication recursively, writing a recursive boolean method which searched an array for a specified value, coming up with a recursive way of reversing a string, writing a recursive method that returned the biggest element of an array, coding a recursive palindrome detector and, finally, writing a method that recursively counted the frequency of each character in a character array.

##420-203 - Program Development for a Graphical Environment

The main objective of this course was to introduce its students to the fundamentals for designing and developing graphical user interface (GUI) applications with the help of the Java Swing widget toolkit and the JavaFX software platform.

###Assignment 1  

This assignment asked up to program a Java application that would generate at random a bank transaction (an integer number from 1 to 4). If the random integer was 1, it would simply print the total balance in the account; 2 corresponded to a withdraw function, 3 to a deposit, and, if 4 was randomly generated, then the program would terminate.

###Assignment 2  

The objective of this assignment was to develop our capacity of "working with event-driven programming and user interfaces with several containers and embedding layouts holding GUI components such as text field boxes, labels, buttons, check boxes and radio buttons." The application allowed users to manage several investor portfolios through a graphical interface.

###Assignments 3 & 4  

These two assignments were coupled together because both of them had to be included in the same program. For the first part, we were asked to design a Sudoku game under the JavaFX framework. For the second part, we had to program a car race simulation, where the speed of each car would be randomly generated after the user signals the program to start the race. The user then sees an animation for each car, and at the end of the race, the user finds out who the winner is.