CS 173 Introduction to Computer Science II Spring 2019

Test 1 Review and Study Guide

General

  • 150 points (15% of your final grade)
  • Yes, it will probably be challenging!
  • Individual effort, no books, notes, or electronic devices
  • You will have 65 minutes to complete each test.
  • Let me know if you have any need of special accommodations before taking the test.
  • Use a pencil (bring one or more sharpened and ready to go)! Also bring an eraser.
  • If you miss the test, you will earn a zero (unless you have prior permission or a clearly documented and incident of unforseen hardship such as illness or death in the family).

Structure and Format

  • Write a java class that represents a ...
  • Write a java method that ...
  • Write a java code segment to ...
  • Describe an algorithm that ...
  • Give the following java code ... , give the output.
  • Other

Content

  • Chapter 1: Java basics
    • CS 171
    • primitives: byte, short, int, long, float, double, char, boolean
    • classes and objects: constructors and instantiation (new), fields (instatnce variables), dot notation, methods, static, this
    • Special classes: String, BigInteger, etc
    • Chapter problems: 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 28
  • Chapter 2: Object-Oriented Concepts
    • Abstract Data Types
    • Inheritance: extends, super
    • polymorphism, dynamic dispatch
    • Java class hieracrchy: Object class, etc
    • interfaces
    • Exceptions
    • casting and type conversion: primitives, objects, widening, narrowing
    • Generics: <T>
    • Chapter problems: 6, 7, 11, 12, 13, 15, 21, 25, 27, 29, 30, 34, 35, 36
  • Chapter 3: Basic Data Structures
    • Arrays
    • Singly-Linked Lists
    • Doubly-Linked Lists
    • Equivalence and .equals()
    • Cloning
    • Chapter problems: 6, 8, 9, 11, 16, 17, 19, 25, 26, 27, 28, 31, 35, 37, 38
  • Chapter 4: Algorithm Analysis
    • Big-Oh Notation
    • O(f(n)) = {g(n) such that f(n) is asyymptotically abounded above by g(n)}
    • Growth rates and ordering of basic functions: 1, log(n), n, n log(n), n^2, n^3, polynomials, 2^n, 3^n, n!, n^n, etc
    • Basic operations in pseudocode
    • Analyzing algorithm performance
    • Summations: 1 + 2 + 3 + ... + n = n(n+1)/2
    • Chapter problems: 1, 2, 3, 4, 5, 14, 15, 16, 17, 18, 19, 20, 21, ,22, 23, 24, 25, 26, 30, 33, 55
  • Chapter 5: Recursion
    • Basics: base case, recursive step, progress towards base case
    • Simple reucursive algorithms: sum, factorial, fibonacci, etc
    • applications to lists: traversal, reversal, finding elements, counting elements, etc
    • Chapter problems: 3, 4, 8, 11, 13, 15, 16, 17, 19, 20, 21, 22, 23, 25
  • Chapter 6: Stacks only!
    • basic operations: push, pop, top, size, isEmpty
    • implementations: SLL, array, etc
    • Chapter problems: 1, 3, 4, 5, 7, 9, 10 11, 12, 13, 14, 17, 19, 21, 23, 24, 25, 30, 31, 32, 34, 35


Copyright © 2019, David A. Reimann. All rights reserved.