Review
Sheet CISC 1115 (Subject to change)
Read text in advance. It’s free and short!!
Know:
·
Lectures
and labs
·
Textbook, workbook, assignments.
Hardware, software, algorithm, program, languages,
compilation and execution, program
Steps in programming, pseudocode, tracing,
bugs, debugging, style, documentation, ++, +=, (?:)
Count, sum, average, don’t divide by
0, max, min, factorial, divisor of, odd/even, Fibonacci
Decimal, binary and hexadecimal
number systems
Algorithms to keep straight:
· Max/min-compare current to value
being remembered
· Linear search-compare each element
to the value for which you are searching
· Binary search and its friends (guess
numbers, squareroot)
· Bubble sort- compare each element to
the next one
· Consecutive Duplicates-compare each
element to the next one
Applications
(A) Basics
(1)
Preliminaries
A
basic model of actual computer systems and the internet
Computer
terms
History
of computing
Building
software: programming languages, compilers, testing
Programmers
and users
(2) Hello,
World
Simple one method
(main) programs
Standard
output
String
literals
Comments
(B) Arithmetic Calculations
(1) Numbers
Output
(print/println) of, literals of,
Declarations
of variables
Operations
of the int and double data types
Declaration
initialization, final variables (constants)
Assignment
operators, exchange (swap) algorithm, increment, and decrement
Distinction
between integer and double arithmetic, divisibility, parity
Expressions,
precedence, mixed arithmetic and casting
(2) Input
and Output in Programs
Input
using Scanner, methods: nextInt, nextDouble;
The
import statement
Formatted
output (printf)
(C) Other Types: Strings and Logical
(1) Strings
Output
of, literals,
Declarations,
Operations of String and their use (concat,
length, substring (both forms), indexOf/lastIndexOf (both forms), trim, toUpperCase,
toLowerCase, charAt, compareTo, equals)
Primitive
vs Reference [Object] types: operator vs methods
The
char data type
Input
using Scanner, methods: next, nextLine;
(2) Logical
The
boolean type; declaring boolean variables
Relational
operators
Assigning
to boolean variables; flags
Logical
operators
The
conditional operator
Range
checking
(D) Methods
(1) Calling
Static Methods
Invocation, arguments, and
return values
Current time (System.currentTimeMillis)
Strings to ints/doubles: Integer.parseInt,
etc.
The Math class and its methods (sqrt, random)
Composition
(2) Java
API Documentation (System, Math, Scanner, String, PrintStream)
(3) Static Method
Definition
Parameter
declaration, return type, the return statement
Method
scope
Void
methods
Predicate
methods
(4)
Overloading Methods; signature and prototype
(E) Control
(1)
Branching
Compound statements
if, if—else
Cascading if—else
Nested if, if—else
(2) Loops
Counting loops: for
Testing loops: while
Loop body logic: selection,
counting, accumulation, extremes, adjacency logic
Alternate testing loops: do—while
(3) Input
Loops
Headers and counting loops (for)
Sentinel (aka
"trailer") loops (while)
End of data loops (while and hasNext, hasNextInt, hasNextDouble)
(4) Nested
Loops
(F) Arrays
(1) Basics:
Declaration of array reference variables
Creation and initialization of
arrays
Array access
(2)
Traversals:
Sequential Processing
Assignment, selection, counting,
accumulation, extremes, adjacency logic
Reversals
(3)
Array-array operations (copying, comparing, arithmetic element-to-element ops)
(4) Direct
indexed array element access
(5)
Searching:
Sequential
Binary
(6)
Sorting: one or more simple quadratic sorts (selection, bubble,
...)
(G) External Files
(1) File
names vs File objects vs File streams
(2) Scanner
constructor with File object
(3) The
importance of close
(H) Using the JAVA API Documentation
(1) File
names vs File objects vs File streams