CS160: Foundations in Programming


Final Exam Topics, Fall 2009

We have covered chapters/sections 1-5, 6.4, and 7 in Savitch et al. (Java text) and chapters 1 (1.1-1.3, 1.5-1.7), 2 (2.1-2.3), and 3 (3.4-3.6) in Rosen (Discrete Math text). You are responsible for all material in the assigned readings, the lectures, the recitations, the quizzes and the assignments. Specifically, we have covered the following topics.
CONCEPTSDETAILS
Intro to programmingprogram, programming language, algorithm, object oriented programming, class versus object, method, instruction, compiler, types of errors
Data representationbits, bytes, words, binary/decimal number representation, text representation
Program structureimport directive, class heading, main method, block structure, variables, statements, layout, identifiers, method invocations and arguments, input and output
Sets and Functionsset definitions, number sets, equality, infinite versus finite, subset, Venn diagram, tuples, Cartesian products, union. intersection, difference, complement, identities, function definition, one-to-one functions, increasing functions, domain, codomain, range
Data Typesprimitive versus class, initializers, operation precedence, integers (printing, reading, operations, assignment, self-assignment, types of integers), constants, Math package, reals (reading, printing, operations, types), type conversion, typecasting, Strings (reading, printing, operations, methods), characters (literals, characters as integers), numeric relational operators, boolean expressions, operators), bit operations
Hardware number representationunsigned integers, twos complement, addition/subtraction in twos complement
Flow of controlif, if-else, switch, compound statements
Propositional Logicproposition, negation, conjuction, disjunction, XOR, truth tables, compound logic expressions, conditional (implication), biconditional, logic and bit operations
Propositional and Predicate Logictautology, contradiction, truth tables, equivalences, proof by inference, predicate, quantifiers, English to Logic and back
Loopswhile, for, do-while, pre-test vs. post-test, loop cautions, nested loops, reading input, reading files, command line (args) input, be able to read code with loops and write simple loops
Arrays1D, 2D, array indexing, accessing arrays, arrays of strings
Proof TechniquesDirect proofs, contrapositive, contradiction, proof by cases, proof of equivalence, rules of inference, fallacies
Methodsmethod structure, calling methods, access qualifiers, return values, variable scope, parameter passing (primitive types vs. arrays), instance variables, method overloading