CD Studio: JavaScript (PSAM3210)

Assignments

Assignments for this course will appear below.

A1: Hello, World

You’ll complete a series of 3 quick exercises intended to familiarize yourself with JavaScript and its syntax. These exercises are more detailed in the assignment README, but they are as follows:

  1. Hello World, the classic (1 pt)
  2. Alice, meet Bob (2 pt)
  3. RGB to CMYK (2 pt)

You will learn: Git, JavaScript, Variables, Coding style, String interpolation, Console

Due September 15

A2: Loops

Using loops, write code that accomplishes the following exercises:

  1. Fibonacci, prints the first N fibonacci numbers (3 pt)
  2. FizzBuzz, the classic programming prompt (3 pt)
  3. Albers, draw the squares (4 pt)

You will learn: Data manipulation, Conditional logic, Loops, Arrays

Due September 22

A3: N-Body (Pair)

Implement an n-body simulation, which keeps track of the movements of the inner planets of our solar system. You’ll be provided an initial set of values and be responsible for updating the position, velocity, and acceleration of the planets using linear approximation.

You may choose to complete this assignment individually or with a partner.

You will learn: Loops, Arrays, JSON

Kudos to Princeton’s COS126 for the source material for this assignment.

Due October 6

A4: Garden (Pair)

Create a virtual garden which implements the ability to render and place elements where you click your mouse. Inspiration for this assignment is based on the demo for Put That There.

You may choose to complete this assignment individually or with a partner.

You will learn: DOM and JS Relationship, Functions, Modularizing code, Event listeners

Due October 20

A5: Sierpenski (Pair)

Implement a sierpenski triangle which renders in an HTML Canvas by recursively calling itself again and again. A user should be able to specify the level of detail (n) that the triangle renders at.

You may choose to complete this assignment individually or with a partner.

You will learn: Recursion, Canvas

Due November 3