Programming Assignments
General Information
- The initial deadline for each programming assignment is at 11:00pm on the due date shown.
- Programs that do not compile will not be accepted.
Tentative Schedule
Assignment | Out | Initial Deadline |
---|---|---|
Project 1 (Introduction) | 9/8 | 9/17 |
Project 2 (Selection) | 9/22 | 10/1 |
Project 3 (Functions) | 10/13 | 10/22 |
Project 4 (Iteration) | 10/27 | 11/5 |
Project 5 (Files) | 11/3 | 11/12 |
Project 6 (Arrays) | 11/22 | 12/3 |
Getting Handout Code
The project handout code is in the directory:
/export/home/public/schwesin/csc135/projects/
and each project has the naming convention projectX-handout
where X
is the project number.
Example: copy the project 1 handout code to your home directory
cp -r /export/home/public/schwesin/csc135/projects/project1-handout ~/
Project Submission
To submit a project, execute the following command from within your projectX-handout
directory:
~schwesin/bin/submit csc135 projectX
where X
is the project number.
Program Evaluation Criteria
For each project, you need to edit two files: pX.cpp
, where X
is the project number, and program_plan.txt
. You must not change the names of these files. The source code and program plan are evaluated based on the following criteria:
Analysis and Design: the program submission must include a program plan document. See the Program Plan document for details.
Style:
- The program must be documented according to the Documentation Standards.
- The program must be written in a structured form with appropriate indentation and white space.
- Identifiers must have meaningful names.
Functions: After functions are covered, the program must make appropriate use of functions. Each function must be well defined and perform only one task.
Specification: The program must work properly according to the specification. That is, it must solve the specified problem and produce correct results.
C++ Style Guidelines
ST01: Meaningful names for variables, constants and functions. Multi-word variables can use either camelcase or snakecase, but you must use a consistent naming convention throughout the program. That is, do not mix camelcase and snakecase in the same program. Using a variable name with a single character is only appropriate if the variable is the iteration variable of a loop; otherwise using a single character variable is not correct. For example, if a variable represents an average, name it
average
instead ofa
.ST02: Consistent indentation (4 spaces is common).
ST03: Variable declaration statements must declare a single variable.
ST04: Define values as constants when needed.
ST05: Constants must have uppercase identifiers (for example MAX_LENGTH instead of max_length.)
ST06: Consistent brace style.
ST07: There must be one blank space between operators (for example, x = 5 + 7.)
ST08: The must be one space after a comma.
ST09: Loops and conditionals must use braces.
ST10: Use parentheses for clarity in complex expressions.
ST11: Avoid global variables where they are unnecessary.