Introduction to Computer Science for Majors II James Tam Return to the course web page

CPSC 233: Assignment 2 (Marking Key)

    Your score Max score

Coding style (marks independent of program functionality)

   
 
  • 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 (4), Often (8), Mostly (12), Always (14)
  14
 
  • Follows good Object-Oriented conventions
   
   
  • Information hiding: Never (0), Sometimes (1), often (2), Mostly (3), Always (4)
  4
   
  • Class attributes are logical to the definition (e.g., not variables that are just local to a method but belong to each instance): Never (0), Sometimes (2), Often (4), Mostly (6), Always (8)
  8
   
  • Each class (save the "SpaceSimulator" and "GameStatus" classes) consists of at least 3 methods
  6
   
  • Program decomposition into classes is logical e.g., GameStatus does not include code for the user interface
  5
   
  • Static variables employed (the attributes of  class "GameStatus" specified in the assignment descipription excepted), -4 marks each instance with a a max of 12 marks lost
  -12
   
  • The code for the classes are not included in its own file (-3 each instance, max of 15 marks lost)
  -15
 

Sub total

 

37

Documentation (marks independent of program functionality)

   
 
  • Header documentation includes full name and tutorial section
  8
 
  • Some form of versioning system is demonstrated in the header documentation
  2
 
  • Each method is documented (similar to documentation for the entire program but applies only to that method)
  6
 
  • Program limitations documented
  2
 
  • Program features documented (cut and paste out of the assignment specifications acceptable)
  20
 

Sub total

 

38

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)

   
  Classes listed in assignment description submitted (the class methods can be largely empty)   5
  The galaxy has each sector bounded above, below, to the left and right   4
  The cells of the galaxy are horizontally and vertically numbered   2
  Displays the movement menu and gets user input   2
  Displays the attack menu and gets user input   2
  Game proceeds on a turn-by-turn basis, turns in proper order   7
  Human player's ship can travel to adjacent sectors (marked halved if non-adjacent sectors can be reached which is halved further if game allows occupied sectors to be entered).   12
  Debug menu can be invoked from the movement or attack menu   2
  Computer ship hull value can be determined at run-time   2
  Player can quit the game from either the movement or attack menu   2
  Ship regeneration properly implemented   4
  Debug mode implemented (reasonable debugging messages)   4
  Human player can attack   8
  Computer player can attack   8
  Cheat mode makes the player's ship invulnerable (computer ship must already have attack feature implemented to get credit for this feature)   4
  The game can be won   4
  The game can be lost   4
  Computer-controlled ships randomly move to adjacent sectors (the mark may be reduced in the same way as the human-controlled ship).   12
  Graphical display of output (input may still be console-based)   6
  Program has appropriate sounds effects   4
 

Subtotal

 

98

Design requirements (may modify the raw functionality score)

   
 
  • Implements static methods (other than 'main()' and methods that access the "GameStatus" static attributes)
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)

UML class diagram (marks independent of program functionality)

   
 
  • Class Galaxy attributes (3) and methods (3) properly specified and matches actual code
6
 
  • Class StarShip attributes (3) and methods (3) properly specified and matches actual code
6
 
  • Relationship and multiplicity between classes properly specified
2

 

Subtotal

14

OVERALL ASSIGNMENT RAW TOTAL

 

187

GRADE POINT

 

4.3

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
35 0.7
50 1
60 1.3
70 1.4
80 1.5
85 1.6
90 1.7
95 1.8
100 1.9
105 2
110 2.1
113 2.2
116 2.3
119 2.4
122 2.5
125 2.6
128 2.7
131 2.8
134 2.9
137 3
140 3.1
143 3.2
146 3.3
149 3.4
152 3.5
155 3.6
158 3.7
161 3.8
164 3.9
167 4
170 4.1
173 4.2
176 4.3