A __________ has occurred when the observed output did not match the expected output - Answers
failure
An ____________________________________________________ is when any further processing will
result in the observed output not matching the expected output - Answers erroneous state
A _______________________ is the algorithmic cause of of the observed output not matching the
expected output. - Answers fault
In order to have a complete test case, you need to have ... - Answers A set of specific input values
A set of specific output values
A _____________________________ leads to a ____________________________ which leads to a
_______________________________________ - Answers fault, erroneous state, failure
A successful test case shows us... - Answers that a fault exists
a failure
Testing is used to prove that your code has no faults. - Answers False
Which type of testing allows you to look at the code while developing test cases? - Answers Whitebox
testing
What type of testing can you use while following Test Driven Development - Answers Blackbox testing
The best practice of breaking our system into smaller components to test individually is known as.... -
Answers Unit testing
What is the result of
u o u - Answers <1, 4, 1, 4>
What is the result of
u o t - Answers <1, 4, 5, 3, 8>
What is the result of
Reverse(s) - Answers <3, 2, 7, 5, 3>
What is the result of
Prt_Btwn(1, 4, s)
, Note: Prt_Btwn(n, m, string)
n is included, m is excluded, positioning starts at 0. - Answers <5, 7, 2>
What is the result of
|t| where t = <5, 3, 8> - Answers 3
What is the result of
Occurs_ct(3, s) where s = <3, 5, 7, 2, 3> - Answers 2
How would you use the above strings and our string notation to get the string <1, 4, 4, 1>? - Answers u o
Reverse(u)
How would you use the above strings and our string notation to get the string <1, 2, 3, 4>? - Answers
Prt_Btwn(0, 1, u) o Prt_Btwn(3, |s|, s) o Prt_Btwn(1, |u|, u)
How would you use our string notation to get the first value out of an unknown string v? - Answers
Prt_Btwn(0,1,v)
How would you use our string notation to get the last value out of an unknown string v? - Answers
correct answers:
Prt_Btwn(|v|-1,|v|,v)
Prt_Btwn(0, 1, Reverse(v))
Prt_Btwn(|v| - 1, |v|, v)
Prt_Btwn(0,1,Reverse(v))
You are developing a program that will use a lot of Lists. Right now you want them all to be ArrayLists,
but you know that in the future there may be a better implementation of the List interface. You want to
be able to change all of your Lists from ArrayLists to that new implementation easily if a new
implementation is released in the future. What design pattern should you use? - Answers The Factory
Method Pattern
You are developing a program that needs to monitor several nodes across a large network. If something
happens to any individual node, that should trigger a response from your program. What design pattern
should you use? - Answers The Observer Pattern
You are developing a program in Java. You have created an interface with multiple implementations.
Some of the methods of your interface don't need direct access to the private data, so you code those as
default methods in your interface, and don't override them in the implementations. Other methods do
need private data, so they are abstract in interface and provided in each implementation. What design
pattern are you using? - Answers The Template Hook Pattern