e02 : Midterm Exam
num | ready? | description | exam date |
---|---|---|---|
e02 | true | Midterm Exam | Thu 11/16 09:30AM |
Midterm Exam
Link to actual exam (this is only a placeholder after after the exam is complete, graded, and returned): Actual Exam.
Code from e02
What is covered
- H00 through H14
- Emphasis will be on homeworks that were not covered on on the first Midterm Exam E01
- Specifically, emphasis will be on H05 through H14
- That’s HFJ Chapters 1-16, and Ch 17 pp.581–595), and HFDP Chapters 1,2,3.
- Chapters covered on Homeworks H01 through H14 from HFJ and HFDP.
- lab00, through lab05
- Lecture notes from start of course up to the class before the exam.
Some topics to focus on:
- Lambda Functions (from lecture notes, from lab06)
- Sorting via Lambda functions and comparators (See HFJ Chapter 16, as well as lecture notes)
- Inheritance and Interface and Polymorphism. See HFJ Chapters 7 and 8.
- See, for example, the second problem from this practice midterm https://ucsb-cs56-f16.github.io/exam/e01/cs56_f16_e01_practice_c/
- That was from a midterm that was preparation for E01, but in fact, we only used the first question from that midterm on E01.
- So, the second question, the one about inheritance and interfaces, and Polymorphism, is fair game.
- Quesiton 3 from https://ucsb-cs56-f16.github.io/exam/e02/cs56_f16_e02/ on Polymorphism
- Inner classes
- How would you distinguish between the relationship between “inner class” and “outer class”, vs. “parent class” and “derived class”?
- What is special about non-static inner classes? (The textbook describes this using the word “special bond”. But it will not be sufficient to memorize that word, since it is not a well-defined technical term in Java—it is a word particular to this textbook. You must, in fact, try to deeply understand what the book is getting at with that word.)
Revisit the java.util.ArrayList<E>
data structure, in particular.
Here’s why:
- It is one of the fundamental tools of Java programming.
- Problems involving
ArrayList<E>
are good ways to check whether your fundamental coding skills are strong or weak.- Be advised: there will be basic coding questions on the exam. The CS department leadership has issued a strong and clear signal that every lower division programming course needs to test basic programming skills on each and every exam. If your basic coding skills need practice, visit: https://ucsb-cs56-pconrad.github.io/resources/practicing_coding/
- If you master
ArrayList<E>
, the concepts you’ve mastered translate pretty well to the other data structures injava.util.*
, such as:- how to use generics (that whole
<E>
thing, as inArrayList<E>
,TreeMap<K,V>
) - how to work with collections (e.g. the enhanced for loop such as
for (String s : strings)
whenstrings
is anArrayList<String>
- the idea of
extends
as in being able to explain what the wordsextends
andimplements
mean in this context:public class ArrayList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, Serializable
- how to use generics (that whole
So, in addition to the items above, be sure that you understand some basis things as well:
Links to past exams
Note that the exact coverage of each of these exams varies quite a bit, since the pace of topics, and placement of exams during the quarter can vary considerably. You are encouraged to look at all of them as examples of the types of questions you might be asked, but match them against the topics we have covered, vs. the ones we have not covered.
NOTE: NOT ALL PREVIOUS EXAMS ARE AVAILABLE. The available ones are linked to below.
- Fall 2017 Midterm E01: https://ucsb-cs56-f16.github.io/exam/e01/cs56_f16_e01/
- Fall 2017 Midterm E02: https://ucsb-cs56-f16.github.io/exam/e02/cs56_f16_e02/
-
Fall 2017 Midterm Final: https://ucsb-cs56-f16.github.io/exam/e03/cs56_f16_e03/
- Summer 2017 M16 Midterm (there was only one): http://ucsb-cs56-m16.github.io/exam/e01/cs56_m16_e01/
- Summer 2017 M16 Final: http://ucsb-cs56-m16.github.io/exam/e02/cs56_m16_e02/
- http://www.cs.ucsb.edu/~pconrad/cs56/16W/exams
- http://www.cs.ucsb.edu/~pconrad/cs56/15W/exams
- 14W exams are not available online
- http://www.cs.ucsb.edu/~pconrad/cs56/13S/exams
- http://www.cs.ucsb.edu/~pconrad/cs56/12W/exams
- http://www.cs.ucsb.edu/~pconrad/cs56/12S/exams