Some Elements of Style
Submitting the Assignment
Type the following in comment lines at the top of your code:
♦ Line 1: Name
♦ Line 2: Assignment Description (lab number 1-1, for example)
For C++
Place the code in a Word document, followed by a screen capture of the output - crop the picture
For Java: Type, in bold after the code, the word OUTPUT
Copy the output which appears at the bottom of the run and paste it in the Word document following the word OUTPUT
If assignments are multiple pages, staple them. Assignments remain in my notebook until graded and returned.
Three hole punch the assignment
Watch me place a date on the assignment, check you off in tab 3 of my manual, and place the assignment in tab 4
Error Mitigation
Carefully outline your program before you being writing code
Write code and debug it in small segments
Make code no more complex than it needs to be (keep it simple)
Use comments as appropriate
Comment out code as necessary to identify sources of error
Declare all variables at the start of the main function
Use short and meaningful names for functions or methods, and variables.
Capitalize the first letter of each word when using compound words.
Indent sections of code.
Use parentheses to force precedence - omit needless ones.
Only 2 braces per column (the left brace and its matching right brace)