Course web page: 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)

   
 
  • 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 UserInterface consists of at least 3 methods
  3
 
  • Class Manager consists of at least one method for each of the list functions: average, display, highest, lowest, random, set fixed.
  6
 
  • 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

 

25

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). (Min. of 9 methods that need to be documented)
  9
 
  • Program limitations documented
  1
 
  • Program features documented
  6
 

Sub total

 

19

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)

   
 
  • Displays main menu
  1
 
  • Prompts for input
  1
 
  • Able to distinguish between the different menu options
  3
 
  • Program runs until user quits
  1
 
  • Display contents of list (2 marks for basic case, 4 marks for advanced)
  4
 
  • Assigns random grades to each list element
  4
 
  • Assigns a grade of 2.0 to the first 10 elements
  2
 
  • Calculate and displays the average grade
  4
 
  • Determine and display the highest grade in the list
  4
 
  • Determine and display the lowest grade in the list
  4
       
 

Subtotal

 

28

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

 

82

GRADE POINT

 

4.3

 

 

UML Class Diagram

   
 
  • Class Manger
  4
 
  • Class UserInterface
  4
 
  • Relationship and multiplicity
  2

 

Subtotal

 

10

 

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
14 0.7
16 1
18 1.3
20 1.4
22 1.5
24 1.6
26 1.7
28 1.8
30 1.9
32 2
34 2.1
36 2.2
38 2.3
40 2.4
42 2.5
44 2.6
46 2.7
48 2.8
50 2.9
52 3
54 3.1
56 3.2
58 3.3
60 3.4
62 3.5
64 3.6
66 3.7
68 3.8
70 3.9
72 4
74 4.1
76 4.2
78 4.3