|CSC 161||Grinnell College||Spring, 2015|
|Imperative Problem Solving and Data Structures|
Although this page has strong historical roots, numerous revisions and refinements are underway to reflect the evolution of this course.
The table below provides a general overview of the modules for CSC 161. Each module has these elements:
The table references these materials:
|Module||Overall Purpose||Summary and Main Topics||Readings||Illustrative Examples||Lab Exercises||Project Description|
|000||Introduction: Play a song
Introduce foundational concepts of C programming, the Scribbler robot, and the Linux terminal window. These topics comprise major components of imperative problem solving with C.
|An introduction to Linux basics, C programming, and the
Scribbler robots, including:
||Program a song|
Develop, compile, and run a program that includes a song/melody at least 30 seconds long.
|001||Motion and sensors
Introduce and explore capabilities from loops and conditionals, which are fundamental control structures of imperative problem solving. Changes of state provide contrast with functional problem solving.
|An introduction to
control flow in C and Scribbler programming, including
||Make the robot dance and sing.
Implement a program that controls a robot's movements to avoid obstacles. The program should include if and switch statements, for and while statements.
|010||Motion and sensors
Organize data and structure algorithms to help manage the logical complexity of programs in C. Data structures include 1-dimensional arrays. Tackle logical complexity by organizing components of solutions to problems and encapsulate common tasks. Parameters include values, addresses, arrays, and function prototypes.
An introduction to the use of data structures, functions, and
procedures to manage the complexity of programs. Main topics include
||Follow a moving object
Implement an "Uninterpretable dance" in a program, in which each of several dance steps are performed in separate functions. Function parameters should include both values and addresses.
|011||Utilize character data and process user input
Introduce C's model for characters and string data; allow users to enter data from the terminal, and provide mechanisms to process user data.
|A consideration of ways to expand problems and problem
solving from simple static programs declaration towards coded solutions
that take input and follow commands based on input, including:
||Robot follows typed commands (2-3
Design a program that controls the robot through commands typed into the terminal. Commands include basic motion (forwards/backwards, turning, stopping), sound, and basic sensor use.
Explore additional mechanisms to group data into logical packages, and apply the general concepts to the storage, retrieval, processing, and display of images.
|Data structures supporting collections
The study of general mechanisms to group data together into logical units, including
Develop several functions to transform images in several ways.
An introduction to dynamic storage, providing flexibility in meeting variable needs of a problem. A linked list provides a particularly flexible structure for creating and editing elements of music.
|Dynamic data structures
An introduction to flexible data structures, including
|Music composition --- insertion of series of notes
periodically into song tune (2-3 days)
Develop/expand a program to store and edit notes in a song, Basel on the flexibility of a dynamic linked list structure.
|110||Stacks and Queues as Fundamental Abstract Data Types
An exploration of two fundamental abstract data structures: stacks and queues, together with implementations using both arrays and linked lists.
|A study stacks and queues as abstract data types,
together with several possible implementations, including
||Study consequences of different stack implementations
Given 4 different stack implementations, consider what is stored, what is returned, and consequences of each approach
A review of common approaches to integrate a wide range of problem-solving techniques and programming concepts in C in the control of Scribbler 2 robots.
Many elements throughout the course can be brought together in the control of robots, including
|Controlling a robot, with command logging
integrate sensors, motion, song; loops, conditionals, i/o, functions, files, and command-line arguments in a common setting