Table of Content

Acknowledgement

This review guide is adopted from Professor Gerald Weiss and Professor Ira Rudowsky and CISC 1115 instructional team with revision.

Structure of Exams

  • For all topics, you should be able to trace, analyze, and write Java code.
    • Questions will for the most part consist of,
      • presenting you with a piece of code and asking you what is output — or what the value of one or more variables are — once the code is executed
      • presenting you with a problem description and asking you to write the corresponding code
      • asking you what is wrong with a piece of code and/or asking you to repair it
      • presenting you with a piece of code and asking you to trace the value of one or more variables as the code is executed
    • There may also be some multiple-choice and short answer questions.
  • Although you will not be asked for definitions of terms, you should know them as they will be used in the text of the questions.
  • While the book is a good supplement, you are only responsible for topics and material in the lecture notes and the various exercises and assignments. These are a great way for you to prepare yourself for the exam.

Topics in CISC 1115.

  1. Arithmetic calculations
  2. Strings and Boolean and logical operations
  3. Static methods
  4. Method overloading
  5. Control structures
    1. Branching (if, if-else, if-else if-else, and nested)
    2. Loops/iterations (for loop, while loop, do-while loop)
    3. Application of loops: Input loops (with Scanner)
    4. Nested loops
  6. Arrays
    1. Basics
    2. Traversals
    3. Array-array operations (see algorithms)
    4. Searching (see algorithms)
    5. Sorting (see algorithms)
  7. Files
  8. Using Java API documentations
  9. Numerical Algorithms
    1. Absolute value; Toggling: 0<-->1 and -1<-->1; parity; divisibility; primality)
    2. Square root finding (binary search and Newton's algorithm)
    3. Histogram construction
  10. Logical Algorithms
    1. Toggling true <--> false
  11. String Algorithms
    1. Forming initials from String variables or an array, variations on separator
    2. picking out tokens from whitespace
    3. finding the nth word in a String
    4. Counting substrings
    5. Replacement
  12. Data input algorithms
    1. Organized data with header (count prefix)
    2. End of data (e.g., using sentinel, i.e., trailing token)
    3. Nested input sequences (either header or sentinel based)
  13. Ordered Type Algorithms (numerical and String), e.g.,
    1. Maximum (minimum) of two
    2. Maximum (minimum) of three
    3. Checking for ascending (descending) order of two
    4. Checking for ascending (descending) order of three
  14. Sequence of Input and Array/ArrayList Traversal Algorithms
    1. Counting items having a common property
    2. Accumulations. addition, multiplication, conjunction, disjunction
    3. Checking for ascending (descending)
    4. Finding extremes (maximum, minimum)
    5. Determination of all/some/none of the items having a common property
  15. Adjacency algorithms
    1. identifying runs (e.g., of consecutive numbers)
    2. counting or eliminating duplicates
  16. Single array modification
    1. Element shifting
    2. Reversing elements
    3. Frequency counts
  17. Multiple array algorithms
    1. element-to-element arithmetic, comparison, string operations
    2. copying, selecting
    3. Sorting and Searching
    4. Selection sort
    5. Sequential search
    6. Binary search