CSC 161 Grinnell College Fall, 2013
Imperative Problem Solving and Data Structures

Semester Outline for CSC 161

Module Dates Overall Purpose Summary and Main Topics Examples Lab Exercises Project Theme
000 (module details) Friday, August 30 — Tuesday, September  10 Introduction: Play a song
This module helps CSC161 students to gain familiarity with foundational concepts of C programming, the Scribbler robot, and the Linux terminal.
Basics of Linux and C
  • basic Linux
  • introduction to using the terminal
  • elements of a C program, including variables and primitive types
  • basic Scribbler actions (beeping)
  • Pirates of the Caribbean
  • Spirit Song
  • Linux commands
  • Elements of a C Program
  • Using the Scribbler 2: connect, disconnect, sound
Program a song
001 (module details) Wednesday, September 11 — Friday, September  20 Motion (+song, motion)
This module introduces and explores the possibilities that are offered by loops and conditionals. These capabilities are applied to controlling a robot that creates sounds and moves simultaneously.
Control structures
  • conditional statements
  • loops (e.g. initialization, iteration, condition testing, loop body, for, while)
  • Scribbler motion
  • Dance
  • Ice cream truck
  • Types and variables (with casting)
  • Conditionals, Scribbler motion
  • Loops
  • Loops and Scribbler 2 motion
Make the robot dance and sing
  Friday, September 27 Hour Test 1
010 (module details) Monday, September 23 — Wednesday, October 2 Motion and sensors
This module expands the CSC161 students' working knowledge of C language, improves problem solving and creativity, and creates an introduction to more complex programming.
functions and arrays
  • one-dimensional arrays,
  • writing functions,
  • testing programs and functions,
  • values and addresses,
  • Scribbler 2 motion and sensors
  • Avoid object
  • Move until a wall and turn right
  • Follow moving object
  • Braitenberg machine: Alive
  • 1-dimensional arrays
  • testing:
  • functions and parameters
  • values, addresses, and the & operator (2 labs)
Follow a moving object

Friday, October 4 — Tuesday, October 8 Data representation Representation of numbers
  • non-negative binary integers
  • sign-magnitude, ones- and twos- complement notation
  • floating point representations
  • integer representation
  • floating-point representation
  Wednesday, October 16 Hour Test 2
011 (module details) Wednesday, October 9 — Monday, October 28 Deepen understanding of imperative problem solving and C
The purpose of this module is to deepen understanding of the C language and smoothly integrate previous experience in the course into the larger framework of programming in C.
  • characters
  • strings
  • input/output
  • forthcoming
  • characters and strings
  • Input/output
  • I/O: basic menu framework
Robot follows typed commands
100 (module details) Tuesday, October 29 — Wednesday, November 6 Image Processing
The purpose of this module is to introduce the customizable nature of self-written programs by using structs and 2-dimensional arrays.
Structured data
  • structs
  • 2-dimensional arrays
  • change pixel (shell, full program)
  • transform pictures
  • transform a pixel
  • transform pixels in a picture
  • sort pixels in a picture
Transform a Picture
101 (module details) Friday, November 8 — Tuesday, November 19 Music Composition
This module introduces dynamic data structures (with pointers and linked lists) as a means to store lines of music that evolve through the composition process.
Dynamic data storage
  • pointers
  • linked lists
  • program management (separate header, implementation, application files)
  • insert theme into canon/fugue
  • pointers: create/return array, populate with sensor data
  • linked lists (2 labs)
Music composition --- insertion of series of notes periodically into song tune
  Wednesday, November 20 Hour Test 3
110 (module details) Friday, November 22 — Monday, December 2 Storage/retrieval Patterns
This module increases familiarity with programming in C, integrates the Scribbler 2's sensors into the curriculum, and continues to practice previously-introduced concepts
The purpose of this module is to clarify previously introduced concepts, such as
  • more pointers and linked lists
  • queues
  • stacks
  • Bash scripts
  • Transform image in various ways
  • stacks
  • queues
  • Bash scripts (for testing)
Do something interesting with pictures or travel in a maze
111 (module details) Tuesday, December 3 — Friday, December 13 Integrated Robotics
This module integrates and reviews material that has been presented through the semester, with a particular emphasis on C programming concepts and full usage of the Scribbler robot.
Advanced Input/Output
  • Files
  • Command-line arguments
  • use robot with command-line actions and with log file
  • reading and writing with files
  • files for include, separate compilation, separate linking
  • command-line arguments
Robot motion with logging