http://ucsb-cs56-w18.github.io/exam/e01/typos/
Hints/Clarifications:
- For the
Factors.java
file: the pre- and post- conditions above addNextFactor
apply only to the method addNextFactor
, not to any other
method or constructor.
- NEW: That means, you don’t need to worry about order in the constructor.
Just take the elements in the order they come.
- If the notation
for (int i: nums)
is unfamiliar; it was covered in the chapter. Do
your best to infer what it means, and answer on that basis.
- For number 7, the blank should simply be filled with an expression that
correctly initializes the variable
lastElement
.
remove
in java.util.ArrayList “Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).” (But I don’t think you need this.)
Notices
- IGNORE SEAT NUMBER. Leave it blank.
- YOU MAY RIP OFF HANDOUTS
- You may use one sheet of notes as usual. Please write your name on it
- No talking during the exam. Please put all questions in writing on the green sheet.
http://ucsb-cs56-f17.github.io/exam/e03/typos/