CSE 2221 Midterm 2 2025 UPDATE Verified Questions And Answers |
CSE 2221 Midterm 2
With 100% Correct Answers graded A+ Guaranteed Success!!
Study online at https://quizlet.com/_3jzxnr
1. Precondition characterizes the responsibility of the pro-
gram
that calls the method (the client)
2. Post-condition characterizes the responsibility of the pro-
gram that implements the method (the im-
plementer)
3. Parameter Mode Part of the contract that specifies the way a
method might change the value of the cor-
responding argument.
4. Clears A parameter mode. Upon returning from a
method call, a clears-mode parameter has
the initial value for its type.
5. Restores The default parameter mode. Upon return-
ing from a method call, a restores-mode pa-
rameter has the value it had when it was
passed into the method.
6. Replaces A parameter mode. Upon returning from
a method call, a replaces-mode parameter
may have a different value than its incoming
value, but the method's behavior doesn't de-
pend on the incoming value of the parame-
ter.
7. Testing Proving code has an error
8. Debugging Finding and fixing an error in the code
9. Receivers
1/6
, CSE 2221 Midterm 2
Study online at https://quizlet.com/_3jzxnr
Distinguished formal parameters, implicit
arguments
10. Overloading Having methods/variables all with the same
name. The actual constructor is inferred by
the program from the argument type.
11. .copyFrom() Copies values not references
12. .newInstance() Has the advantage that you don't need to
know the name of any implementation class
to call the method
13. .compareTo() Has all the >,< signs pointing in the same
direction
14. Primitive types Types built-in to Java, refers to an object
15. Reference types All other types, refers to a location in memory
which points to an object
16. Primitive variable Variable of primitive type
17. Reference variable Variable of reference type
18. Reference value The memory address of a reference type at
which an object is stored
19. Object value The actual value of a reference type
20. ---> We use an arrow instead of "=" to remind
ourselves that a variable is a reference vari-
able
21. =
2/6
CSE 2221 Midterm 2
With 100% Correct Answers graded A+ Guaranteed Success!!
Study online at https://quizlet.com/_3jzxnr
1. Precondition characterizes the responsibility of the pro-
gram
that calls the method (the client)
2. Post-condition characterizes the responsibility of the pro-
gram that implements the method (the im-
plementer)
3. Parameter Mode Part of the contract that specifies the way a
method might change the value of the cor-
responding argument.
4. Clears A parameter mode. Upon returning from a
method call, a clears-mode parameter has
the initial value for its type.
5. Restores The default parameter mode. Upon return-
ing from a method call, a restores-mode pa-
rameter has the value it had when it was
passed into the method.
6. Replaces A parameter mode. Upon returning from
a method call, a replaces-mode parameter
may have a different value than its incoming
value, but the method's behavior doesn't de-
pend on the incoming value of the parame-
ter.
7. Testing Proving code has an error
8. Debugging Finding and fixing an error in the code
9. Receivers
1/6
, CSE 2221 Midterm 2
Study online at https://quizlet.com/_3jzxnr
Distinguished formal parameters, implicit
arguments
10. Overloading Having methods/variables all with the same
name. The actual constructor is inferred by
the program from the argument type.
11. .copyFrom() Copies values not references
12. .newInstance() Has the advantage that you don't need to
know the name of any implementation class
to call the method
13. .compareTo() Has all the >,< signs pointing in the same
direction
14. Primitive types Types built-in to Java, refers to an object
15. Reference types All other types, refers to a location in memory
which points to an object
16. Primitive variable Variable of primitive type
17. Reference variable Variable of reference type
18. Reference value The memory address of a reference type at
which an object is stored
19. Object value The actual value of a reference type
20. ---> We use an arrow instead of "=" to remind
ourselves that a variable is a reference vari-
able
21. =
2/6