Solved

Suppose an Object Is Intended to Store Its Current Position

Question 44

Multiple Choice

Suppose an object is intended to store its current position in a 2D array using private instance variables and a mutator: Suppose an object is intended to store its current position in a 2D array using private instance variables and a mutator:   What problem could be encountered with the method moveLeft() , which is intended to move the current position of the object to the left one column on the grid?  A) The method should be changing the row instance variable. B) The method should be incrementing the column instance variable. C) The method might cause the instance variables to go out of the bounds of the 2D array. D) The method should be changing local variables instead of instance variables. What problem could be encountered with the method moveLeft() , which is intended to move the current position of the object to the left one column on the grid?


A) The method should be changing the row instance variable.
B) The method should be incrementing the column instance variable.
C) The method might cause the instance variables to go out of the bounds of the 2D array.
D) The method should be changing local variables instead of instance variables.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents