Course web page: Introduction to Computer Science for non-majors II James Tam Return to the course web page

CPSC 219: Assignment 1 (Marking Key)

    Your score Max score

Coding style (marks independent of program functionality)

   
 
  • Appropriate use of white space (source code)
  2
 
  • Self-documenting naming conventions
  3
 
  • Boolean and mathematical expressions are simple and easy to read
  3
 
  • Each method implements one well defined task
  4
 
  • Functions/methods don't exceed one screen size in length ~ 30 lines of code (excludes whitespace and documentation)
  2
 
  • Class Attacker consists of at least 2 methods (the constructor and something to generate an attack)
  2
 
  • Class Defender consists of at least 2 methods (the constructor and something to generate a defense)
  2
 
  • Class attributes are logical to the definition (e.g., not variables that are just local to a function or method but belong to each instance)
  2
 
  • Static variables employed (unless otherwise allowed)
  -4
 
  • The code for the 3 classes are not included in its own file.
  -9 (-3 each)
 

Sub total

 

20

Documentation (marks independent of program functionality)

   
 
  • Header documentation includes full name and tutorial section
  2
 
  • Some form of versioning system is demonstrated in the header documentation
  1
 
  • Each function/method is documented (similar to documentation for the entire program but applies only to that function/method)
  6
 
  • Program limitations documented
  1
 
  • Program features documented
  6
 

Sub total

 

16

Functionality (only qualify for these marks if the program runs: note some features obviously requires other features to be implemented before credit will be granted)

   
 
  • Program prompts user for the number of rounds
  1
 
  • Program runs for the specified number of rounds
  1
 
  • Program prompts user for the probabilities of the three attack types
  3
 
  • Program error checks probabilities can set default probabilities
  2
 
  • Program generates attacks with equal probability of each
  6
 
  • Program generates defenses with equal probability of each
  6
 
  • Program can correctly determine the effect of attack/defense
  2
 
  • Program displays 4 required statistics for each round, 2 marks each. If insufficient statistics are displayed you may not only lose marks for this feature but you may also lose marks for the other features if it is not clear if/how features are working.
  8
 
  • Program displays required statistics at the end of the simulation, 2 marks each. If insufficient statistics are displayed you may not only lose marks for this feature but you may also lose marks for the other features if it is not clear if/how features are working.
  16
 
  • Probability of each attack type determined by user input (3 marks for each type).
  9
 
  • Defender can adapt to the attacker's pattern of attacks
  14
 

Subtotal

 

54

Design requirements (may modify the raw score)

   
 
  • Implements static methods (other than 'main()')
Divide functionality marks by two1
 
  • Program consists of only one class (style marks will also be lost)
Divide functionality marks by two1
 
  • Functionality not assigned to the appropriate class as specified in the assignment description (e.g., the attacker implements a task that belongs to the defender).
Max loss of 8 marks to functionality (tallied after the above two modifiers, if applicable)

OVERALL ASSIGNMENT RAW TOTAL

 

90

GRADE POINT

 

4

1 These two penalties are cumulative so if a program was written using only one class and was full of static methods then the student's program functionality mark would quartered.

Min raw score GPA
0 0
30 0.7
36 1
40 1.3
42 1.4
44 1.5
46 1.6
48 1.7
50 1.8
52 1.9
54 2
56 2.1
58 2.2
60 2.3
62 2.4
64 2.5
66 2.6
68 2.7
70 2.8
72 2.9
74 3
76 3.1
78 3.2
80 3.3
82 3.4
84 3.5
86 3.6
88 3.7
90 3.8
92 3.9
94 4