toblick
/
cs101
/
exam 3 review
class: center, middle # Exam 3 Review Intro to Computer Science --- # Agenda 1. [Exam Structure](#structure) 1. [Prior Knowledge](#prior-knowledge) 1. [Inheritance](#inheritance) 1. [Polymorphism](#polymorphism) 1. [Interfaces](#interfaces) 1. [Abstract Classes](#abstract-classes) 1. [Exceptions and Errors](#exceptions) 1. [Recursion](#recursion) 1. [Conclusions](#conclusions) --- name: prior-knowledge # Prior Knowledge -- ## Cumulative by nature By nature of the material, the exam will include all contents we have covered this semester. --- name: part0 # Part 0: - Representation of numbers. What is a bit, what is a byte? Floating point numbers. - Basic Unix (not as much as in midterm one). - Compiled and interpreted languages. Advantages/disadvantages. How does Java fit into this picture? --- name: part1 # Part 1: - Java types. - Branching and control flow. `if/else/switch/case`. - Declaring and using methods. Keywords. Signatures. Scope of a variable. Overloading. - Arrays. Passing references or values to methods. - Multidimensional arrays. Does Java have them? Arrays of arrays and how to use them. Implications for speed and memory usage (see 'batching' problem). Ragged arrays. - `ArrayList` and why it is needed (you do not need to memorize/bring the method signatures). --- name: part2 # Part 2: - OOP. Abstraction. Writing re-usable code. Encapsulation and black boxes. - What is a class? What is an object? Constructors. Methods and properties. Keywords (`public, private, protected, static, final, ...`). Getters and setters and why we use them. - Reference types and shared data. When should one make a (deep) copy, when is a reference enough? - Inheritance. Composition. Using `super()`. Overriding methods. - Polymorphism. Casting. `instanceof`. Batch processing. - Abstract classes. Abstract methods. - Interfaces. Default methods. Implementing multiple interfaces. Limitations of interfaces. - Examples of all of the above. Why is the polymorphism concept so important? What can and cannot be instantiated? - Exception handling. Errors vs. exceptions. Unchecked and checked exceptions. `try/catch/finally` and `throws`. - Recursion - Sorting: Insertionsort, Mergesort, Quicksort --