CS 236 Labs and Projects
Note: Labs and Projects are to be completed by each student individually (not by groups of students).
Labs are assignments where TAs help students complete a number of steps in preparation for working on projects.
Projects are assignments where students gain experience with writing code using discrete math concepts.
| Assignment | Due Date |
|---|---|
| Lab 0 | 13 Jan 2026 |
| Lab 1 | 20 Jan 2026 |
| Project 1 | 27 Jan 2026 |
| Lab 2 | 3 Feb 2026 |
| Project 2 | 10 Feb 2026 |
| Lab 3 | 3 Mar 2026 |
| Project 3 | 10 Mar 2026 |
| Lab 4 | 17 Mar 2026 |
|
Project 4
Rule Evaluation Example |
24 Mar 2026 |
| Lab 5 | 31 Mar 2026 |
| Project 5 | 7 Apr 2026 |
Help Session Slides
| Slides for Project 1 Help Session |
| Slides for Project 2 Help Session |
| Slides for Project 3 Help Session |
| Slides for Project 4 Help Session |
| Slides for Project 5 Help Session |
Project Testing
The project testing page provides test inputs and expected outputs for testing your project.
Compiling Your Code on Linux
When you want to pass off your project, your code needs to compile and run using the g++ compiler on Linux. The version of g++ we use is the one installed on the CS lab machines. We compile your code on Linux with a command similar to this:
$ g++ -Wall -std=c++17 -g *.cpp -o project1
Running Your Code on Linux
Your program will be run with the name of the input file given on the command line. For example, your program might be run like this:
$ ./project1 in10.txt
Your program needs to read its input from the given input file and write its output to the standard output.
Submitting Project Files
Put all your '.cpp' and '.h' files into a '.zip' file. Note that these are the only files you should submit. (Also note that your files need to be either '.cpp' files or '.h' files, no other file extensions are recognized.)
Make sure the files in your '.zip' are NOT within a folder. The pass-off driver is not smart enough to find files in folders.
For example, on linux you could use a command like this:
$ zip project1.zip *.h *.cpp
Submit your '.zip' file on Learning Suite under the correct assignment for the project.
Project Pass-off
Project pass-offs are not currently available. We expect project pass-offs will be available around the second week of the semester.
Write-Protected Files
The input files given to your program will be write-protected. Your program will need to open input files only for reading, not for both reading and writing. If you attempt to open a write-protected input file for both reading and writing the open will fail.
For the C++ language, this means you need to use 'ifstream' to read input files (and not use 'fstream').
Program Exit Status
Your program must run to completion with a normal exit status for any input. Do not terminate with a non-zero exit status for any input, including inputs that have errors.
For the C++ language, this means that the 'main' function needs to return a value of zero and cannot return any non-zero value.
Other Project Resources
valgrind
Valgrind is a tool that will find memory access problems in your code. You should run valgrind on your code while you are creating it. Valgrind will help you avoid common coding errors and help you save debugging time. Valgrind is available on the Linux machines in the CS labs. You run valgrind on the executable program like this:
$ valgrind --leak-check=full ./project1 in10.txt
When using valgrind you should compile the code with the -g option. This allows valgrind to give better information about the location of memory access problems in the code.