Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3. Matching (11 pts) A. A numbering scheme used throughoat Java in which a B. An

ID: 3909114 • Letter: 3

Question

3. Matching (11 pts) A. A numbering scheme used throughoat Java in which a B. An aray of arrays, the elements of which are accessed with C. Manipulating values in any order whatsoever to allow quick D. A system in which values are stored directly and copying is E. A Java keyword signifying no object. sequence of values is indexed starting with O. multiple integer indexes access to each value. achieved by creating independent copies of vales Processing each array clement sequentially from the first to Multidimensional Array Zero-Based Indexing Sequential Access Value Semantics F. the last. Manipulating values in a sequential manner from first to last. The initialization of variables to a default value. An indexed structure that holds multiple value of the same type. An integer indicating the position of a particular value in a Array G. Random Access Null H. I. J. K. Array Traversal Auto-Initialization A system in which references to values are stored and copying is achieved by copying these references. 4. Matching (11 pts) A set of actions an object can perform, often reporting or modifying its internal state A variable inside an object that makes up part of its internal state A. Mutator B. Abstraction State Accessor Behavior Field C. D. E. F. G. A set of values (internal data) stored in an object The object that is referenced during an instance method call Code that interacts with a class or objects of that class A programming entity that contains state and behavior The extent to which the code for a class represents a single abstraction Client H. An instance method that modifies the object's internal state I. Focusing on essential properties rather than inner details J. Hiding the implementation details of an object from the Implicit Parameter Encapsulation clients of the object An instance method that provides information about the state of an object without modifying it Object K. Cohesion 5. This code is to reverse the numbers array. What's wrong with the code below? (1 pts) int[] numbers [11, 42, -5, 27, e, 891; for (înt î e; i

Explanation / Answer

3)
Multidimensional Array : B. An array of arrays, the elements of which are accessed with
multiple integer indexes.

Zero-Based Indexing : A. A numbering scheme used throughout Java in which a sequence of
values is indexed starting with 0.

Sequential Access : G. Manipulating values in a sequential manner from the first to last.

Index : J. An integer indicating the position of a particular value in a data structure.

Value Semantics : D. A system in which values are storred directly and copying is achieved
by creating independent copies of values.

Array : I. An indexed structure that holds multiple value of the same type.

Random Access : C. Manipulating values in any order whatsoever to allow quick access to
each value.

Null : E. A Java keyword signifying no object.

Reference Semantics : K. A system in which reference to values are stored and copying is achieved
by copying these references.
Array Traversal : F. Processing each array element sequentially from first to last.

Auto Initialization : H. The initialization of variables to a default value.

4)

Mutator : H. An instance method that modifies the object's internal state.

Abstraction : J. Hiding the implementation details of an object from the clients of the object.

State : B. A variable inside an object that makes up part of its internal state.

Accessor : K. An instance method that provides information about the state of an object without
modifying it.

Behavior : A. A set of actions an object can perform, often reporting or modifying its internal
state.

Field : C. A set of values stored in an object.

Client : E. Code that interacts with a class or objects of that class

Implicit Parameter : C. A set of values stored in an object.

Encapsulation : Focussing on essential properties rather than inner details

Object : F. A programming entity that contains state and behavior

Cohesion : G. The extent to which the code for a class represents a single abstraction.


5)
problem in this code is for(int i = 0; i < numbers.length; i++), this loop access the array till
last element.

In first iteration :
numbers[i] = numbers[numbers.length - 1 - i];
numbers[numbers.length - 1 - i] = temp;
these two statement will replace 1st element to 5th and 5th element. (i.e. numebers[0] = 89 and numbers[5]= 11)
but in last iteration these value will be replaced again then the actual value will be stored in the array and
reversed array will not be formed.

For getting reverse array a change in loop statement is required, i.e.
for(int i = 0; i < numbers.length/2; i++)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote