e01 : Midterm (NOTE NEW DATE)
num | ready? | description | exam date |
---|---|---|---|
e01 | true | Midterm (NOTE NEW DATE) | Thu 08/30 09:30AM |
Midterm Exam (80 minutes)
Link to actual exam (this is only a placeholder after after the exam is complete, graded, and returned): Actual Exam.
Coverage
- H00, H01, H02, H03, H04, H05, H06
- Reading that was covered in those homework assignments: HFJ 1,2,3,4,5,6,7,8,9,10,11,16,17 (only pages 581-595)
- lab00, lab01,lab02,lab03
- Lectures through Wednesday 08/29/2018.
A few selected topics: (not an exclusive list, but some things from the homework, in-class work, reaading, labs, lectures, above that I may highlight:
- the distinction between primitive values, references, and the objects to which references refer
- == vs. .equals. Review this web page: topics/java_double_equals_vs_dot_equals/
- how compiling and executing with bytecodes and the Java Virtual Machine differs from compiling and executing when working with C/C++
- working with ArrayList
(as in [lab02](/lab/lab02)) - the distinction between implementing a class that inherits from
ArrayList<E>
(is-a) vs. one that has a private data member of typeArrayList<E>
(has-a). With is-a, you work with thethis
object. With has-as, there is a data member you work with. Understand what that means in terms of code.
- the distinction between implementing a class that inherits from
- The most basic git workflows:
- what does
git clone url
do when the url is a repo on github.com? (In your answer, address the relationship created between the two repos that are involved in this operation.) git add filename(s)
,git commit -m 'message',
git push origin master`- what is the command to show the current situation with the repo represented by the current directory (A:
git status
) - what changes a regular directory tree into a git repo? (A: presence of the
.git
subdirectory at the top level)
- what does
- At a high level, some basic facts about Ant and Maven (factored out into a list below)
Ant vs. Maven for this exam
What they share in common:
- The fact that they are both addressing the same problem that
make
andMakefiles
address for C++, i.e. managing the compile, build, test and execution steps for a project. -
Ant and Maven both use XML files to specify the project details
- XML also uses self-closing tags when there is no content (e.g.
<foo>
) and close tags (</foo>
)
Some things that distinguish Ant from Maven:
- Ant uses
build.xml
by default, Maven usespom.xml
by default. - Ant only addresses the problems addressed by
make
andMakefile
; Maven also addresses the problem of automatically downloading dependencies (including transitive dependencies; if you depend on A, and A depends on B,C,D, Maven will figure that out and download B,C,D for you.) - With Ant, while there are some common conventions, ultimately the directory structure is up to the programmer; Maven requires a particular directory structure that you are not free to change.
- Ant is imperative, while Maven is declarative.
- Ant and Make both rely on the programmer to specify not just what, but the exact steps of what in detail.
- A target in an Ant
build.xml
does only what the programmer specifies; nothing more, nothing less. - With Maven, you specify only what you want done, and some configuration for how, but the detailed steps are already programmed in behind the scenes.
Some facts about XML:
- XML, like HTML uses open tags (e.g.
<foo>
) and close tags (</foo>
) - An open tag and close tag, with everything in between, is an element.
- Example: This is one
foo
element. Thefoo
element contains twobar
elements inside it.<foo> <bar>content1</bar> <bar>content2</bar> </foo>
- Example: This is one
- Elements completely inside another element are children of that element.
- In this example, the
foo
element has twobar
elements as children.<foo> <bar>content1</bar> <bar>content2</bar> </foo>
- In this example, the
- Open tags can have attributes, which are name value pairs. Values should be in either single or double quotes.
Example of attributes:
<pants color="blue" size="medium">
<pocket type="front">keys</pocket>
<pocket type="side">phone</pocket>
</pants>
- The
pants
element has two attributes.- The first attribute has name
color
and valueblue
- The second attribute has name
size
and valuemedium
- The first attribute has name
- The content of the
pant
s element is twopocket
elements - The first
pocket
element has:- one attribute, with name
type
and valuefront
- content which is the string
keys
- one attribute, with name
- The second
pocket
element has:- one attribute, with name
type
and valueside
- content, which is the string
phone
- one attribute, with name
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.
Here is a repo with code from old exams, if you want to see some of the solutions and try the code for yourself: https://github.com/ucsb-cs56-pconrad/cs56-exam-code-examples
NOTE: NOT ALL PREVIOUS EXAMS ARE AVAILABLE. The available ones are linked to below.
- Midterm from W18: https://ucsb-cs56-w18.github.io/exam/e01/cs56_w18_e01/
- Note: because of the 9-week quarter due to the Thomas Fire, we only had one midterm
-
Final from W18: https://ucsb-cs56-w18.github.io/exam/e03/cs56_w18_e03//
- First two midterms from F17
- Midterm cs56_f17_e01
- Midterm cs56_f17_e02
- Final cs56_f17_e03
- All three exams from F16
- Midterm cs56_f16_e01
- Midterm cs56_f16_e02
- Final 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