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)

Programming style (credit may be awarded independent of fusnctionality) Student grade Max grade
Follows good programming conventions common to all programs (e.g., Appropriate source code white space, self documenting names, clear/simple expressions, methods implementing one task/max 30 lines of code, appropriate used of named constants): Never (0), Sometimes (2), Often (6), Mostly (8), Always (10)   10
Information hiding: Never (0), Sometimes (1), often (2), Mostly (3), Always (4)   4
Each class (save the "Driver") consists of at least 3 methods   3
Static variables employed (debugging flags excepted), -4 marks each instance with a max of 12 marks lost   -12
The code for the classes are not included in its own file (-3 each instance, max of 9 marks lost): Manager, Attacker, Defender   -9
Sub-total: Style 0 17
     
Documentation (credit may be awarded independent of functionality) Student grade Max grade
Header documentation includes full name and tutorial section   2
Some form of versioning system is demonstrated in the header documentation   2
Program limitations documented   1
Program features documented (cut and paste out of the assignment specifications acceptable but it MUST be detailed, clear and specific...the marker must be able to know exactly what features in this marking key were actually working)   6
Sub-total: Documentation 0 11
     
Program functionality (program must run to be awarded credit) Student grade Max grade
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 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   10
Design requirements (may modfiy the functionality score)    
Implements static methods other than 'main()': halve functionality marks1 
Program consists of only one class (style marks will also be lost): halve functionality marks1 
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 8 marks lost 
Sub-total: Functionality 0 64
     
Assignment: total raw score 0 92
Assignment: grade point 0 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.

Raw score min Grade point
0 0
16 0.7
20 1
24 1.1
28 1.2
32 1.3
36 1.4
40 1.5
42 1.6
44 1.7
46 1.8
48 1.9
50 2
52 2.1
54 2.2
56 2.3
58 2.4
60 2.5
62 2.6
64 2.7
66 2.8
68 2.9
70 3
72 3.1
74 3.2
76 3.3
78 3.4
80 3.5
82 3.6
84 3.7
86 3.8
88 3.9
90 4