Final Exam Topics
The exam is open book and open notes and you are free
to use a calculator or computer except for accessing the Internet.
The exam is not cumulative -- it only covers the material since the midterm with the addition of C++ (i.e. all of the programming languages, C++, C#, Scheme, Prolog, PHP).
Be prepared to write snippets of code, give the output
of a snippet of code, find bugs in code, write a solution in multiple languages,
analyze the major differences between different programming languages including
the strengths and weaknesses of one approach to another.
General Programming Languages
Questions
- Programming paradigms
- Differences between Procedural, Object-Oriented, Functional, Logic,
Client/Server
- Concept of the virtual machine
- Garbage collection, what it is, where it would be needed
Java
C++
- Syntax for iteration, control structures, defining
variables, methods, classes, etc.
- Passing parameters by reference vs. pass by value
- Relationship between arrays and pointers
- Use of const
- Dynamic memory allocation using new, delete, creating
linked data structures
- Performing our own memory management
.NET
-
If someone asks you, should be able to tell someone what it is
-
Relationship between OS, CLR, Base Classes, Programming Languages
-
How the architecture supports goals of robustness,
multiple programming languages, multiple platforms
-
What is really happening when you compile and run a C# or .NET program
C#
-
Syntax for iteration, control structures, defining variables, methods, classes, etc.
-
Similarities with Java
-
Passing parameters by reference vs. pass by value
-
Concept of automatic boxing and unboxing
-
Defining classes
-
Concept of a delegate, so we can pass in a function as an argument
Scheme
-
Atoms vs. lists
-
Syntax for invoking functions, defining functions,
let, cond, equal, car, cdr, cons, quote, '
-
Common functions like length, reverse, etc.
-
Eval, apply
-
Passing, returning functions as values
-
Be prepared to write some recursive function to
process lists in some way
Prolog
-
Understand basic predicate calculus and propositional logic
-
Representing facts and rules, using AND (,) and OR (;)
-
Binding values to variables
-
Writing queries
- Working with lists, head and tail
- How prolog handles backtracking
- Define some knowledge, rules to search it, and queries
using the rules
CGI and HTML
- Basic HTML, including FORM tag, fields for hidden,
text, textarea, submit
- Model of computation; what happens when a HTML page
invokes a CGI program, where the program is run and how data is returned to
the browser
- Difference between GET and POST
PHP
- Weakly typed, how PHP performs implicit type
conversion
- Syntax for iteration, control structures, defining
variables, methods, classes, concatenation, etc.
- Classes
- Defining instance variables
- Using this
- Everything public
- Passing parameters by reference vs. pass by value
- Default behavior when passing objects
- Related: what happens when one object is
assigned to another
- Different behavior with PHP 4 vs. PHP 5
- What happens with $$var or $var()
- How to pass parameters between a web page and PHP
script
- Arrays
- Append to end with $a[]=val;
- Index by string or by integer
- Common functions such as count
- Using foreach on an array
- Common functions such as print_r, explode, implode,
trim, substr, etc.
- Generating HTML
from PHP
- Database access in PHP (be able to read some code that might deal
with a DB)
JavaScript
- You may be asked how JavaScript code would work or to write a few lines of JavaScript or given more JavaScript and asked to modify it, but not to write large amouns from scratch
- Adding to a HTML file
- Basics on vars, operators, control statements
- Weak typing
- Scoping - global and function scope; static; no block scope
- Using arrays
- Creating objects
- Using the prototype property
- Defining custom objects and inheritance
- Accessing/modifying elements on a HTML page
- JavaScript event handlers
- AJAX and the XHR object