Lecture notes for the Introduction to Computer Science I by James Tam

Return to the course web page

CPSC 231: Assignment 2 (Marking Key)

    Your score Max score

Coding style (marks independent of program functionality)

   
 
  • Appropriate use of white space (source code)
  2
 
  • Self-documenting variable and constant names.
  3
 
  • Use of named constants as appropriate
  2
 
  • Boolean and mathematical expressions are simple and easy to read
  4
 

Sub total

 

11

Documentation (marks independent of program functionality)

   
 
  • Header documentation includes name and tutorial section
  1
 
  • Header documentation contains description of program.
  1
 
  • Some form of versioning system is demonstrated in the header documentation
  1
 
  • In line documentation used for blocks of code
  3
 

Sub total

 

6

Functionality (only qualify for these marks if the program runs)

   
 
  • Prompts for date of birth
  1
 
  • Continually re-prompts the user if the birth year is outside the valid range
  1
 
  • Continually re-prompts the user if the birth month is outside the valid range
  1
 
  • Continually re-prompts the user if the birth day is outside of valid range.
  1
 
  • Continually re-prompts the user if the birth day is not valid for the birth month entered by the user.
  1
 
  • Gives clear and helpful error messages
  2
 
  • Displays a life path number based on input (not hard-coded/fixed)
  1
 
  • Displays correct life path number
  2
 
  • Correctly reduces numbers to a single digit
  4
 
  • Month is correctly reduced to single digit
  1
 
  • Day is correctly reduced to single digit
  1
 
  • Year is correctly reduced to single digit
  1
 
  • Sum of results is reduced correctly to a single digit
  1
  Sub total   18
       

OVERALL ASSIGNMENT TOTAL (Letter grade)

 

35

 

Raw score Letter grade
34 - 35 A
32 - 33 A-
30 - 31 B+
28 - 29 B
26 - 27 B-
24 - 25 C+
22 - 23 C
20 - 21 C-
17 - 19 D+
14 - 16 D
0 - 13 F