CSC 161 Grinnell College Spring, 2012
 
Imperative Problem Solving and Data Structures
 
 

Summary and Main Topics

This module applies previous concepts (e.g., pointers, linked lists) to widely-used dynamic data structures. Topics covered include:

  1. More about pointers
  2. Variations of linked lists
  3. Stacks
  4. Queues
Day Topic Preparation In-class Due Date Availability
for
Extra
Credit
Friday, April 20 Abstract data types
Module 6: Stacks, queues
Readings on      
Monday, April 23 Abstract data types
Module 6: Stacks
reading on stacks lab on stacks    
Tuesday, April 24 Abstract data types
Module 6: Queues
reading on queues lab on queues Due: Monday, April 30  
Wednesday, April 25 Bash scripts
Module 6: Using Bash scripts for testing
reading on Bash Scripts lab on bash scripts   Friday, May 11
Friday, April 27 Project Examples: Stack implementations
  • main program using stack operations according to some implementation
  • approach 1, in which the stack contains an array of pointers and the stack just points to strings as entered
  • approach 2, in which the stack contains an array of the strings themselves and strings are copied onto the stack and back
  • approach 3, in which the stack contains an array of pointers and space is allocated to copy the string during each push operation.
  • approach 4, in which the stack contains an array of the strings themselves and strings are copied onto the stack and just a reference is to the string is returned by a pop.
Photos with Stacks and Queues Due: Friday, May 4  
Monday, April 30 Project Commands and Logging Photos with Stacks and Queues Due: Friday, May 4  

Project: Robot Pictures with Stacks and Queues

Working in pairs, students should develop a program that creates a stack and a queue, makes the robot take (at least) fifteen pictures, and show the pictures in a "movie" and a "reverse movie", using the stack and queue implementations.

Use a Makefile for compiling your program(s); the Makefile should compile the stack implementation, queue implementation and movie operations separately.

You should also consider possible mistakes that may arise with your implementation, develop a test plan, and run tests to ensure you code is working correctly.

Each image should be different from the previous. Possible ways to implement this would be to have the robot move between taking pictures, or have someone/something move in front of the robot.

Grading

This project will be worth 25 points, based on the following rubric: