CSC 222: Object-Oriented Programming
Fall 2017

Final Exam Review


Course goals:

Course content:

Object-Oriented Concepts design goals abstraction, object-focused, modularization classes/methods should be highly cohesive & loosely coupled Model-View-Controller (MVC) pattern class/object concepts class vs. object, fields & constructors & methods private vs. public, static, final interfaces & polymorphism List interface, Comparable interface, Collections.sort class hierarchies: e.g., Grade --> LetterGrade, passFailGrade inheritance & polymorphism derived class, parent class inheriting methods/fields, overriding methods class hierarchies: e.g., BankAccount --> SavingsAccount, CheckingAccount Java Specifics types primitive types: int, double, char, boolean object types: String, Integer, Double, ... enumerated types expressions String: + math: +, -, *, /, %, +=, -=, *=, /=, %=, ++, -- boolean: ==, !=, >, <, >=, <=, &&, ||, ! statements assignment, print, return, if, if-else, while, for, for-each method calls: internal (this.METHOD()) vs. external (OBJ.METHOD()) exception handling: throws, try/catch libraries String, Character, Collections, ... I/O formatted output: System.out.format, format strings Scanner: hasNext, next, hasNextLine, nextLine, hasNextInt, nextInt, ... FileWriter: write, close Data Structures arrays and ArrayLists advantages of ArrayLists over arrays methods: add, remove, set, get, size, ... parallel arrays/ArrayLists Dictionary example: add, contains, size, display implementation built on top of ArrayList unsorted vs. sorted vs. "lazy" sorted versions Structured data e.g. a WordList of Word objects, a UFOList of UFOsightings Algorithms algorithm analysis big-Oh notation, rate-of-growth worst case vs. average case vs. best case performance searching & sorting sequential search O(N) vs. binary search O(log N) Collections.binarySearch, List & Comparable interfaces insertion sort O(N^2) vs. selection sort O(N^2) vs. merge sort O(N log N) Collections.sort, Collections.shuffle recursion base case(s), recursive case(s) avoiding infinite recursion, Cat in the Hat analogy recursion vs. iteration: efficiency tradeoffs, redundancy simulations and modeling Assignments 1. Java basics (CodingBat) 2. classes & objects (ESPTester) 3. repetition & simulations (roulette betting) 4. files, strings & lists (COLI stats) 5. interfaces & sorting (sorted COLI stats) 6. objects & data structures, MVC (Hunt the Wumpus) X. Extra credit Java practice (CodingBat)