Chapter 5: Decisions Flashcards
relational operator
An operator that compares two values, yielding a Boolean result.
lexicographic order
Ordering strings in the same order as in a dictionary, by skipping all matching characters and comparing the first non-matching characters of both strings. For example, “orbit” comes before “orchid” in lexicographic ordering. Note that in Java, unlike a dictionary, the ordering is case sensitive: Z comes before a.
null reference
A reference that does not refer to any object.
black-box testing
Testing a method without knowing its implementation.
white-box testing
Testing methods by taking their implementations into account, in contrast to black-box test ing; for example, by selecting boundary test cases and ensuring that all branches of the code are covered by some test case.
code coverage
A measure of the amount of source code that has been executed during testing.
boundary test cases
A test case involving values that are at the outer boundary of the set of legal values. For example, if a method is expected to work for all nonnegative integers, then 0 is a boundary test case.
trace messages
A message that is printed during a program run for debugging purposes.
Boolean operator
An operator that can be applied to Boolean values. Java has three Boolean operators: &&, ||, and !.
De Morgan’s Law
A law about logical operations that describes how to negate expressions
formed with and and or operations.