Know everything that you were supposed to know for Test #1
Expect a question in which you are evaluate expressions involving
calls to methods in the java.lang.String class.
Examples (where s and t are variables of
type String and k and m are of type
int, all having values indicated on the test):
s.charAt(k+2)
s.substring(k,m)
(s+t).length()
s + t.substring(k)
s.indexOf('A')
s.substring(s.indexOf(','), s.lastIndexOf(' '))
Expect a question in which you are given a set of terms having to
do with Java programming and a list of statements each of which
has one or two blanks to be filled in from terms in the given set.
Example:
A(n) _______ method is one that returns information about the
state of a(n) _______.
The answers are observer and object.
Expect a problem that includes a variety of multiple choice questions,
some of which show Java code and ask you about the results of its
execution or about the terminology that is used in talking about
the elements that appear in it (e.g., parameters, variables, etc.)
Expect problems in which you are called upon to develop an
if-else statement and/or a while-loop.
Expect a problem in which you are to transform a string given in
one form (e.g., a traditional calendar date) into another form
(e.g., a "normal form" calendar date such as "20211107").
Expect a problem in which you are given the code of an "instance" class
(i.e., one from which it is intended that objects will be created)
similar to TossableCoin, UmpireClicker, or Temperature
and you are asked to supply the body of a method that is given an
object of that class (e.g., via a parameter) and that carries out
some specified task with that object.
Example:
Develop a method that, given a TossableCoin object,
tosses it until tails occurs three consecutive times and reports how
many tosses occurred up to that point.
Expect a problem in which you are given the code of an "instance"
class (e.g., UmpireClicker) and are asked to add a new
method with some specified functionality, or to modify an existing
method so that it behaves a little differently than the original
version.