BUNDLE 2026 FULL QUESTIONS AND
VERIFIED SOLUTIONS
⩥ Precondition. Answer: -Client is responsible for meeting requirements
-Implementer can assume that it is being met
-"Requires clause"
***IF THE PRECONDITION IS FALSE, THE FUNCTION CAN
LITERALLY DO ANYTHING INCLUDING NOT TERMINATE
⩥ Postcondition. Answer: -Implementer is responsible for meeting
requirements
-Client can assume that it is being met
-"Ensures clause"
⩥ Override. Answer: -2 methods with same name and parameters, where
one is in the parent class and one is in the child class
⩥ Overload. Answer: -2+ methods in a class with the same name and
different parameters
⩥ 4 types of parameter modes. Answer: 1. Restores - Outgoing value =
Incoming value
,***THIS IS THE DEFAULT MODE
2. Clears - Incoming value = 0
3. Replaces - Independent of incoming value
(Ex: x=z)
4. Updates - Dependent on incoming value
(Ex: x=x+6)
⩥ Reference types. Answer: Mutable
Immutable
⩥ Type. Answer: Name of the set for all values a variable with this type
can have. Each type has a mathematical type that models it
⩥ Main Method Syntax. Answer: public static void main(String[] args)
⩥ Compiler. Answer: Checks source code (.java) and generates byte
code (.class)
⩥ 2 Types of Variables. Answer: 1. Program Variable - May change
during execution
2. Mathematical Variable - Arbitrary, fixed value
⩥ Statement. Answer: 1. Simple statement - Ends with a semi colon
, 2. Compound statement - Block
3. Control statement - If/else-if/while
⩥ Expression. Answer: Any code fragment that has a value
Ex: int x = 7;
⩥ Method Header. Answer: Includes the return type, method name, and
parameters (everything at the top)
⩥ Method Signature. Answer: Method name and parameters
⩥ Information Hiding. Answer: Leaving out details of a system
⩥ Abstraction. Answer: Making a valid cover story for information
hiding
⩥ Object. Answer: A part of memory that holds values for references
⩥ Iterator. Answer: -Lets you visit all members of a collection
-Ex: for (String term: dictionary) { //code }
Iterator = Term