Previous Lecture Lecture 14 Next Lecture

Lecture 14, Thu 11/15

Midterm 2 Review

Link to Sample Midterm 2 Exam from S18: sample midterm 2

Midterm 2 Review

Logistics
	- Bring studentID and writing utensil
		- Preferably ink or dark led
		- PLEASE WRITE LEGIBLY
	- No electronic devices
	- No books
	- No notes

Format
	- Mix of questions
	- Short answer
		- Briefly describe / define / state ...
	- Write code
	- Fill in the blank / complete the table
	- True / False, if false explain why
	- Given code, what is the output ...
	- Similar to midterm 1, expect it to take no more than ~ one hour (maybe sooner).
		- Will cover a broad range of topics, but probably not everything

Topics
	- Will cover everything up to last Thursday's lecture (11/8)
		- Will not cover OS lecture this past Tuesday
	- Midterm 2 will be cummulative, but with a heavy emphasis on post-midterm 1 material.

Hash Table Topics
	- Know basics of hash functions and performance
		- open-address hashing / double-hashing / chained-hashing
		- map vs unordered_map
		- Implementation details

Mergesort / Quicksort
	- Know the algorithm and how to implement it
	- Understand main ideas and how the array is manipulated as the algorithm executes
	- Know the runtime analysis (best / average / worst cases) and space requirements.

Testing
	- Understand main ideas
		- The tddFuncs way of testing
		- Unit testing
		- Test Driven Development (TDD)
		- Various cases of tests
			Normal / Error / Boundary / ...

Inheritance
	- Understand concepts and how to implement them
	- How constructors / destructors of base / sub classes work
	- Understand memory concepts of base and sub class attributes / functions on the stack and the heap
		- Memory / Object slicing
	- Understand inheritance hierarchies and valid / accessible types

Polymorphism
	- What is polymorphism and when you may want to use it
	- How to enable polymorphism
	- Pure virtual functions and abstract classes
	- How it works in memory

Exceptions
	- Try / catch mechanisms
	- Throwing exceptions
	- Exceptions using inheritance

Function Pointers
	- transform method
	- syntax of function pointers
		- How to declare, assign, and call functions via function pointers
	- Write a function that passes in a function pointer as a parameter and use it within the function