CSE 2231 Midterm 1 LATEST ACTUAL EXAM WITH
VERIFIED QUESTIONS & CORRECT ANSWERS
Question 1.
Variable
ANSWER
The thing that you assign it too
Question 2.
Program type
ANSWER
boolean , char, int, double, String
and
NaturalNumber, Queue<T>, Stack<T>, Sequence<T>, Set<T>, Map<K,V>
Question 3.
mathematical type
ANSWER
boolean, character, integer, real, string of character
and
integer(nonnegative) string of T, string of T, string of T, finite set of T, finite set of (K,V)
Question 4.
precondition (requires clause)
ANSWER
characterizes the responsibility of the program that uses that method (client)
Question 5.
postcondition (ensures clause)
ANSWER
characterizes the responsibility of the program that implements the method
, Question 6.
terminate
ANSWER
return to the calling program
Question 7.
Universal quantification
ANSWER
something is true for every combination of values that satisfy a certain property "for all"
Question 8.
Existential quantification
ANSWER
something is true for some combination of values
"there exists"
Question 9.
Abstract Class
ANSWER
A partial or incomplete class that contains bodies for some but not all of the methods of the
interfaces it claims to implement
Question 10.
Instantiate
ANSWER
YOU CANNOT INSTANTIATE AN ABSTRACT CLASS
Question 11.
Layers
ANSWER
Basically overriding a method
VERIFIED QUESTIONS & CORRECT ANSWERS
Question 1.
Variable
ANSWER
The thing that you assign it too
Question 2.
Program type
ANSWER
boolean , char, int, double, String
and
NaturalNumber, Queue<T>, Stack<T>, Sequence<T>, Set<T>, Map<K,V>
Question 3.
mathematical type
ANSWER
boolean, character, integer, real, string of character
and
integer(nonnegative) string of T, string of T, string of T, finite set of T, finite set of (K,V)
Question 4.
precondition (requires clause)
ANSWER
characterizes the responsibility of the program that uses that method (client)
Question 5.
postcondition (ensures clause)
ANSWER
characterizes the responsibility of the program that implements the method
, Question 6.
terminate
ANSWER
return to the calling program
Question 7.
Universal quantification
ANSWER
something is true for every combination of values that satisfy a certain property "for all"
Question 8.
Existential quantification
ANSWER
something is true for some combination of values
"there exists"
Question 9.
Abstract Class
ANSWER
A partial or incomplete class that contains bodies for some but not all of the methods of the
interfaces it claims to implement
Question 10.
Instantiate
ANSWER
YOU CANNOT INSTANTIATE AN ABSTRACT CLASS
Question 11.
Layers
ANSWER
Basically overriding a method