OSU CSE 2221 Midterm 2 Exam/75
Questions and answers
NaturalNumber - - component family that allows you to manipulate natural
numbers (non-negative integers).
is an interface
- modulo - - similar to a remainder, calculated using "clock arithmetic".
when a negative number is "modded", it goes "counter-clockwise," returning
a negative value
- standard methods - - putting highly reused methods into an interface so
they're described in exactly one place
- single point of control - - creating a single place to change code that
affects many others
- kernel (primary) methods - - primary methods that are deemed being
special enough to go into their own interface
- secondary methods - - methods that are more "powerful" than kernel
methods, introduced to make a component readily usable in client code
- constructor - - a method that creates an instance of a class
- no-argument constructor - - default constructor, takes no arguments
- copy constructor - - returns a copy of the parameter value
- instance method - - methods that are called by a specific object
- distinguished formal parameter - - this
- receiver - - object an instance method is called on
- parameter mode - - the effect the parameter will have on the object
- mutable - - object can be modified
- #<variable_name> - - # represents the old (incoming) variable value
- updates parameter mode - - signifies that the parameter may change the
object
does not ensures parameter restoration
, - clear parameter mode - - signifies that the object's value will be reset to
its initial value
- primitive types - - built-in types, such as boolean, char, int, double
- reference types - - all other non-primitive types, such as String, XMLTree,
SimpleReader, NaturalNumber, etc.
- object - - instance of a class
- reference value - - memory address of an object
- object value - - mathematical model value of the object a reference points
to
- memory address - - location in memory of an object
- assignment operator - - =, copies the value of an expression on the right
side into the variable on the left side
- anonymous reference variable - - temporary, inaccessible variables
creating while performing operations during the assignment to a variable
int i = k + 7 has two anonymous reference variables
- uninitialized reference variable - - reference that holds no value
- garbage collector - - reclaims memory from objects that are no longer
referenced
- aliasing of references - - unintentionally modifying an object due to
multiple references pointing to it
only affects mutable types
- immutable - - object that cannot be modified
- array - - group of variables of the same type
always a reference type
- array element - - single variable within an array
- restores parameter mode - - ensures that a parameter has its incoming
value
the default parameter mode
Questions and answers
NaturalNumber - - component family that allows you to manipulate natural
numbers (non-negative integers).
is an interface
- modulo - - similar to a remainder, calculated using "clock arithmetic".
when a negative number is "modded", it goes "counter-clockwise," returning
a negative value
- standard methods - - putting highly reused methods into an interface so
they're described in exactly one place
- single point of control - - creating a single place to change code that
affects many others
- kernel (primary) methods - - primary methods that are deemed being
special enough to go into their own interface
- secondary methods - - methods that are more "powerful" than kernel
methods, introduced to make a component readily usable in client code
- constructor - - a method that creates an instance of a class
- no-argument constructor - - default constructor, takes no arguments
- copy constructor - - returns a copy of the parameter value
- instance method - - methods that are called by a specific object
- distinguished formal parameter - - this
- receiver - - object an instance method is called on
- parameter mode - - the effect the parameter will have on the object
- mutable - - object can be modified
- #<variable_name> - - # represents the old (incoming) variable value
- updates parameter mode - - signifies that the parameter may change the
object
does not ensures parameter restoration
, - clear parameter mode - - signifies that the object's value will be reset to
its initial value
- primitive types - - built-in types, such as boolean, char, int, double
- reference types - - all other non-primitive types, such as String, XMLTree,
SimpleReader, NaturalNumber, etc.
- object - - instance of a class
- reference value - - memory address of an object
- object value - - mathematical model value of the object a reference points
to
- memory address - - location in memory of an object
- assignment operator - - =, copies the value of an expression on the right
side into the variable on the left side
- anonymous reference variable - - temporary, inaccessible variables
creating while performing operations during the assignment to a variable
int i = k + 7 has two anonymous reference variables
- uninitialized reference variable - - reference that holds no value
- garbage collector - - reclaims memory from objects that are no longer
referenced
- aliasing of references - - unintentionally modifying an object due to
multiple references pointing to it
only affects mutable types
- immutable - - object that cannot be modified
- array - - group of variables of the same type
always a reference type
- array element - - single variable within an array
- restores parameter mode - - ensures that a parameter has its incoming
value
the default parameter mode