CSC 270 Grading
Whenever you turn in a programming assignment,
I'll assess how well you've demonstrated each of these skills, on a
scale from 0="didn't use" to 3="fluent, comfortable, idiomatic".
Language-independent skills
I'll assess these skills for every programming assignment you turn in,
and average them over all your programs.
- Use good names for variables, constants, functions, and types, in
accordance with the conventions of the language
- Use indentation, white space, and comments appropriately for
readability
- Re-use functions or "factor out" common code rather than
duplicating code
- Use named constants or the equivalent rather than "magic
numbers", for ease of modification
- Design functions and types to be easily re-used, modified, and
(if appropriate) extended.
For example, most functions should do either I/O or
computation, not both; functions should have one coherent purpose.
- Design I/O interface to be user-friendly and fault-tolerant
- Use appropriate error-checking and error-handling throughout code
- Provide well-chosen test cases
Language-specific skills
I'll compute the maximum score for each
skill, so if you demonstrate a particular C skill in one program, the
fact that it isn't needed in the next C program won't hurt you.
In each language, I've listed "essential", "important", and "obscure"
skills. Each "essential" skill will be weighted 3, each
"important" skill 2, and each "obscure" skill 1. For example, if in C
you demonstrated fluency with pointer variables in C (a 3 in an essential
skill) and marginal command of enumerated types (a 1 in an important
skill), you would have earned 11 points for the C portion of the course:
3*3 + 1*2.
C++ Language Skills
Essential:
- declare and use simple variables, both local and global
- write and use functions, both void and with return types
- declare and use function parameters
- declare and use arrays, 1-dimensional and 2-dimensional
- declare and use C++-style strings
- declare and use classes with data members (i.e. instance
variables)
- declare and use non-static "member functions" (i.e. methods) of
classes
- declare and use class constructors
- use common algebraic operators: +, -, *, /, %, <, >, ==,
<=, >=, &&, ||, !, string concatenation
- use assignment, autoincrement and autodecrement operators: =, +=,
-=, ++, --
- use "if", "if...else", "while", "for" statements for flow of
control
- use #include statements for standard system libraries
- perform buffered, formatted output with "<<"
- perform buffered, formatted input with ">>"
- use composition of classes, and know when to do so
- use inheritance of classes, and know when to do so
- declare and use private and public members, and know when to do so
- override member functions and constructors of base classes in
derived classes
- invoke member functions and constructors of base classes in
derived classes
- declare and use virtual (run-time-polymorphic) member functions;
be able to predict by looking at the code which version of a member
function will be invoked
- declare "pure virtual" functions, and know when to do so
Important:
- overload functions, member functions, and constructors, i.e.
write several w/same name but different parameters
- declare and use function parameters with default values
- declare and use named constants
- declare and use enumerated types
- use standard math routines from math.h
- declare and use pointer variables and the "address-of" operator
- declare and use reference parameters and reference return types
- declare and use const parameters and const return types
- use "do...while", "switch", "break", and "continue" statements
for flow of control
- manipulate files with ifstream, ofstream
- do formatting and parsing with sstream
- allocate and deallocate heap memory (new, dispose)
- write code in multiple, separately-compiled source files
- write and use #include files for common declarations
- use conditional compilation to avoid multiple includes
- use typedef to localize data-type dependencies
- use explicit C-style type casting
- declare and use static "member functions" (i.e. methods) of
classes
- declare and use protected members, and know when to do so
- declare and use default and copy constructors
- overload "<<" and ">>" for user-defined classes
- write "const" member functions, and know when to do so
- use dynamic_cast; know the difference between this and C-style
casting
- declare and use namespaces and "using"
declarations/directives
- write "try...catch..." blocks to handle standard exceptions
- declare and throw user-defined exceptions; write "try...catch..."
blocks to handle them
- declare and use classes with private inheritance; know when to do
so
- use the "assert" macro
- declare and use classes with multiple inheritance; know when to
do so, and the pitfalls of multiple inheritance
- use template-based standard container classes (e.g. vector, list)
and their iterators
Obscure:
- use conditional compilation for other purposes, e.g. architecture
dependencies, compiler options
- use static_cast and const_cast, and know the differences between
these, dynamic_cast, and C-style casting
- declare and use unnamed namespaces, compose namespaces, etc.
- define template-based classes and functions
- write constructors with initializers
- overload operators other than "<<" and ">>"
- use pointers to functions
- use pointers to member functions
Scheme language skills
Essential:
- define and use simple variables
- define and use functions, with and without parameters
- define, instantiate, and use structs
- write functions which take and/or return structs
- use common built-in operators: +, -, *, /, remainder, <, >,
=, <=, >=, and, or, not, equals
- use built-in list operations such as car/first, cdr/rest, cons,
list, length
- write functions which take and/or return lists
- use "cond", function composition, and recursion for flow of
control
- define and use local variables, and know when to do
so
Important:
- define, instantiate, and use other recursive data types such as
binary and N-ary
trees; write functions which take and/or return such data types
- define functions "on the fly" with lambda or local
- perform simple I/O with display, read, write, and newline
- use built-in higher-order functions such as map, filter-if,
count-if, apply, ...
- write functions that take and/or return functions
- modify variables with set!
- modify struct fields with set-struct-fieldname!
- define structs by inheritance
Obscure:
- perform formatted output with format
- perform file I/O with with-input-from-file and with-output-to-file
- organize code in modules
- throw and catch exceptions
- use continuations for flow of control
- create and use vectors
- use "do" for iteration
- write servlets, cgi scripts, XML clients, etc.
Prolog language skills
Essential:
- identify, given two expressions containing variables, whether and
how they unify
- identify, given a query and a rule base, which rule(s) will match
in what order
- write rules with and without hypotheses, with and without
variables
- use "is" to do arithmetic computations
- write recursive rules; know how to avoid infinite recursion
- use symbols to represent non-numeric data
Important:
- use "assert" and "retract" to modify the rule base from within a
program
- create and build structures
- create and use lists; unify head and tail of list; write
recursive rules on lists
- use "write" and "nl" for simple I/O
- use "repeat" and "fail" to produce loops
- use "!" ("cut") for efficiency
Obscure:
- define operators with specified associativity and precedence
- operate on lists in difference-list representation