Computer Science 2

Computer Science II was an introduction to Assembly language as well as Java programming. This course focused heavily on the basics of programming such as loops and conditionals, as well as object-oriented programming. All six of these projects were from a Princeton CS course and were slightly altered for what we were learning in class. The professor for this course was Dr. Louis Yu.

SLIM Assembly Lanuage Programming

This first project was practice for Assembly language that we learned for the first month of class. The actual code that we were writing was SLIM Assembly code and SLIM is a simplified computer that was created by the professors to Gustavus for an easier introduction to Assembly for lower level classes. The tasks for this project were mostly rewriting Python functions (which was learned from the previous course, Computer Science 1) into Assembly code.

More information can be found on this here.

Conditionals and Loops

This was our first Java based project that was composed of 5 different tasks to be done using conditional statements along with basic arithmetic operations and randomized functions.

The tasks consisted of:

  • Checking to see if 3 numbers where in either all strictly ascending or descending order.
  • Changing a RGB pixel to CMYK through simple calculations.
  • Creating a checkboard made ot of asterisks.
  • Designing a program that recorded how far an individual had walked based on the fact that every step they took had a 25% probability of being in any direction (North, South, East or West) with an input N number of steps.
  • Adding onto the previous program solving for an average change in distance over many iterations of the same number of steps. So, this would mean N number of steps and T number of times iterated through.

More information on this project can be found here.

N-Body Simulation

This was a project that was based on simulating the gravitational pull of large bodies (such as planets or suns). We were asked to program the equations for how the N-bodies would react to each other based off of their mass and then we make a simulation of it.

Click here to learn more!

Recursive Graphics

This project was a relatively quick one that dealt with drawing Sierpinski’s triangle using recursion.

More information on this can be seen here!

Global Sequence Alignment

This project utilized a recursive and dynamic programming approach to solving for how similar two strings of DNA are to each other. We used “top-down” or memoization and “bottom-up” and looked at the differences between the run-time and the memory usage of both different ways of solving the same problem.

More information can be found on this project here.

Guitar Hero

This project was the main project that dealt with object-oriented programming. We made 3 classes that implemented each other as well as an interface. The final product played a chromatic scale of notes using a simulated guitar.

For more information please look here.