CSC 270 Grading
Following is a list of skills I'd like you to have by the end of the
semester.
Language-independent skills
I'll grade these skills for every programming assignment you turn in,
and your semester grade will depend on the average.
- 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 modifiability
- Design functions and types to be easily re-used, modified, and
extended
- 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
- Parse statements and expressions by hand [this will probably be
on quizzes or tests rather than programming assignments]
- construct a hierarchical parse tree
- decide whether the statement or expression is syntactically
legal
- identify the types of all subexpressions
- evaluate all subexpressions
Language-specific skills
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".
Your semester grade will depend on the maximum score for each skill
.
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.
At the end of the semester you'll have earned a number of points in
each language, e.g. 50 of the possible 72 in C, 90 of the possible 131
in C++, etc. I'll compute a fraction for each language, and weight the
five fractions equally, so learning all 51 possible points of Scheme has
the same effect on your grade as learning all 136 possible points of Java.
These five grades will be combined with your average grades on
language-independent skills and with the final exam to produce a semester
grade. As a guideline, earning 40% of the possible points in each
language is probably a C; 60% is probably a B; and 80% is probably an A.
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 pointer variables and the "address-of" operator
- declare and use arrays, 1-dimensional and 2-dimensional
- declare and use C-style strings (i.e character arrays)
- declare and use structs
- use common algebraic operators: +, -, *, /, %, <, >, ==,
<=, >=, &&, ||, !
- 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 formatted output with printf
- perform formatted input with scanf
- perform unformatted input with getchar, gets
Important:
- declare and use named constants
- declare and use enumerated types
- use standard math routines from math.h
- allocate and deallocate heap memory (malloc, calloc, free)
- use "do...while", "switch", "break", and "continue" statements
for flow of control
- manipulate files with fopen, fclose
- perform formatted output with sprintf, fprintf
- perform formatted input with sscanf, fscanf, feof
- perform unformatted input with fgetc, fgets, ungetc
- 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 type casting, including casting pointers
Obscure:
- use the "assert" macro
- use conditional compilation for other purposes, e.g. architecture
dependencies, compiler options
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
Java Language Skills
(If you can do all the Java "essential" and "important"
things, you should be prepared for the Sun Certified Java Programmer
exam.)
Essential:
- declare and use simple local variables
- write and use methods, both void and with return types, and both
static and non-static
- declare and use Strings and their standard methods
- declare and use method parameters
- declare, allocate, and use arrays (including finding their
lengths), both 1-dimensional and 2-dimensional
- use common algebraic operators: +, -, *, /, %, <, >, ==,
<=, >=, &&, ||, !, String concatenation
- Know the difference between == and equals
- use assignment, autoincrement and autodecrement operators: =, +=,
-=, ++, --
- use "if", "if...else", "while", "for" statements for flow of
control
- write code in multiple, separately-compiled source files
- allocate heap memory (new)
- declare and use classes with instance variables
- declare and use class constructors; know whether there's a
default constructor
- perform buffered text output with "print", "println", and
"toString"
- define classes by composition, and know when to do so
- define classes by inheritance, and know when to do so
- declare and use private and public methods and instance
variables, and know when to do so
- override methods and constructors of superclasses in
subclasses
- invoke methods and constructors of superclasses in subclasses
- be able to predict by looking at the code which version of a
method will be invoked
- override the standard "toString" method
- declare and use abstract classes and abstract methods
- declare and use interfaces (i.e. super-abstract classes), and
know when to do so
- write "try...catch..." blocks to handle standard exceptions
Important:
- know the ranges of primitive types, and the syntax for their
literals
- overload functions, methods, and constructors, i.e. write several
w/same name but different parameters
- declare and use named constants
- use "import" statements
- use standard math routines from the Math class
- use javadoc comments appropriately
- use "do...while", "switch", "break", and "continue" statements
- use explicit type casting; know how it differs from C-style
casting
- write Applets, overriding the standard methods such as init and
paint
- use standard GUI components such as JButton, JLabel, JTextField,
etc.
- use standard layout managers such as FlowLayout, GridLayout,
BorderLayout, etc. to position GUI components on the screen
- handle asynchronous input events from the keyboard, mouse, and
GUI components via the "listener" mechanism
- separate the internal model of a display from its graphical
appearance and user-interaction behavior (the "model-view-controller
framework")
- perform buffered input with "read", "Integer.parseInt", etc.
- use Files, InputStreams, OutputStreams, etc.
- access networked resources with URL's
- use "assert" statements
- declare and use packages
- declare and use protected and default (package-private) methods
and instance variables, and know when to do so
- declare and throw user-defined exceptions; write "try...catch..."
blocks to handle them
- use standard wrapper classes (e.g. Integer, Double)
- use standard container classes (e.g. ArrayList, LinkedList) and
their Iterators
- define and use anonymous and named inner classes, and know when
to do so
- write wait-loops using Thread.sleep
- declare and use final parameters
- declare classes and/or methods final, and know when to do so
- override the standard "equals" and "hashCode" methods
- write multi-threaded code using Runnable or subclassing Thread
- synchronize threads using "synchronized", Thread.join,
Thread.wait, and Thread.notify
Obscure:
- use Loggers (I would say "important", but it's new in Java 1.4)
- use the Java regular-expression mechanism to implement search and
substitute operations
- use Observers and Observables to implement the
model-view-controller framework
- write Servlets
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