|CSC 161||Grinnell College||Fall, 2012|
|Imperative Problem Solving and Data Structures|
This module introduces CSC 161 students to fundamental elements of programming in C, including
|Monday, September 24||Examples|
Module 2: Arrays, Functions, Testing, Values, and Addresses
|Tuesday, September 25||Functions with simple parameters||
|Wednesday, September 26||Arrays||lab exercise|
|Friday, September 28||Hour Test 1||Covers through lab on Functions with simple parameters|
|Monday, October 1||Functions with general parameters||lab exercise|
|Tuesday, October 2||The & Operator, Addresses, and Testing||
|Wednesday, October 3||Supplemental Problem 2||Supplemental Problem 2 (done individually)||Wednesday, October 3|
|Wednesday, October 3||Project||Uninterpretable Dance||Due: Tuesday, October 9|
Working in pairs, students should develop a program which makes the robot perform a randomized dance. That is, the program should have these features.
The program should contain at least five dance functions, each of which instructs the robot to follow a different sequence of activities (beeps and movements) in a dance pattern.
The main function should make at least five calls at random to the five movement functions. The functions should be executed in a different random order each time the program is run.
The program need not ensure that each function is called at least once for any single run of the program, but all functions should have an equal probability of being called in each program execution.
The program uses at least one function with an array parameter, a pass-by-value parameter, and a pass-by-reference parameter which is not an array. The function which uses the pass-by-reference parameter should modify the value in a significant way within the function. The function which calls that function should then be effected by the change of that variable.
Well-written code should should be easy to read, understand, and modify. Also, the code should run efficiently. In the context of this project, therefore, your program should have these characteristics:
There should be no redundant or unused code. For example,
The code should be formatted to be easily readable. For example,
The code should also be reasonably efficient. For example,
This project will be worth 25 points, based on the following rubric:
The dance has at least 5 creative and unique dance sequence functions (5 points)
The dance is properly randomized (5 points)
The program properly uses array, pass-by-reference, and pass-by-value parameters (5 points)
Evidence of testing is included (5 points)
The code is reasonably efficient and follows standard conventions (5 points)