Conditional If Statements Lab with the SpaceSmasher Game

The purpose of this lab is to let students experiment with conditional “if” statements while building features of an actual game in Java.  The features explored in this lab include determining game over conditions, controlling sprites with a mouse, event handling to control paddle movement via keystroke, and spawning singular balls via keyboard as well as advanced game mechanics such as fire and ice ball power-ups.  Students will practice branching and gain proficiency with Selection Control Structures (“if” and “switch” statements) while producing a customized version of their very own block-breaking realtime simulation. 

Digital Sound Processing

In this assignment, students implement some simple filters on sound objects, including reversing a sound, mixing arbitrary-length lists of sounds, and changing volumes of sounds. These functions can each be written in ten or fifteen lines of code, using objects that represent sounds and samples from our media module. Then, calling on these functions, students write a "song generator": a function that takes a string of note data (a notestring) and produces its representative sound object that can be played or saved as a wav file.

Stereo Sound Processing

In this 2012 Nifty assignment, students use fundamental CS topics to explore digital sound processing. Using variables, functions, conditionals, and assignment operators in conjunction with the Pygraphics library, students perform various manipulations on sound files. Vocals are removed from the wav files by using the vocal-removing algorithm to subtract channels and isolate the single vocal track along a particular frequency range. Additional manipulations on the sound files, such as fading in and out and panning, are covered so that students can examine the various capabilities of using Python to manipulate digital sound. This assignment is ideal for students with an understanding of implementing libraries and an interest in digital sound processing.

Engagement Excellence

Objects Lab

In this lab, students refactor their code from a previous Graphics Lab to make it more object-oriented. The refactored code draws multiple instances of a house or beach hut.

Loop Lab

In this lab, students use loops and the Java Graphics class to write a program that generates alternate versions of the U.S. flag for the United States Institute of Heraldry. Students also practice using variables to store data so that the flag image can be easily manipulated. A clear grading rubric is provided.

Graphics Lab

In this lab, students are asked to create a Java application that draws a simple house or beach hut. Students use the drawing methods from the Graphics class. A clear grading rubric is provided.

Structs, pointers to structs, reading from files, arrays of structs

This lab has two main parts. In the first part (Steps 1 through 5), students use test-driven development to finish three programs that the students will use to practice storing and manipulating data in structs and arrays, as well as general debugging. In the second part (Steps 6 through 9), students extend a program that reads in airport data from a file, and reports to the user the easternmost airport. Students add code to the program to determine the westernmost, southernmost and northernmost airports in the United States.

Writing Functions

In this assignment, students write four functions, each of which solve real-world problems such as converting inches to centimeters. Through this assignment students practice writing functions and passing and using parameters.

Addition Circuits

In this lab, students work individually or collaboratively to design several circuits. Using a digital circuit design tool called Logism, students will build an 'adder' - a key component of a modern digital computer. This lab covers three 'adder' subcircuits (MyXOR, full adder, 4-bit ripple carry adder).

Hmmm… Assembly!

In this lab, students learn about programming in assembly language. Using the IDLE programming environment and Python, students must run an assembler and simulator.

Subscribe to HTML