CSC 161 Grinnell College Spring, 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) Monday, January 21 — Wednesday, January 30 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) Friday, February 1 — Monday, February 11 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
Monday, February 18 Hour Test 1
010 (module details) Tuesday, February 12 — Friday, February 22 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,
• Scribbler 2 motion and sensors
• Avoid object
• Move until a wall and turn right
• Braitenberg machine: Alive
• 1-dimensional arrays
• testing:
• functions and parameters
• values, addresses, and the & operator (2 labs)

(details)
Monday, February 25 — Wednesday, February 27 Data representation Representation of numbers
• non-negative binary integers
• sign-magnitude, ones- and twos- complement notation
• floating point representations
• integer representation
• floating-point representation
Friday, March 8 Hour Test 2
011 (module details) Friday, March 1 — Tuesday, March 12 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.
Arrays
• characters
• strings
• input/output
• forthcoming
• characters and strings
• Input/output
Robot follows typed commands
100 (module details) Wednesday, March 13 — Friday, April 5 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) Monday, April 8 — Wednesday, April 17 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
• program management (separate header, implementation, application files)
• insert theme into canon/fugue
• pointers: create/return array, populate with sensor data
Music composition --- insertion of series of notes periodically into song tune
Friday, April 19 Hour Test 3
110 (module details) Monday, April 22 — Monday, April 29 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, April 30 — Friday, May 10 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.