I am trying to make the method below however vect is an obje
I am trying to make the method below, however vect is an object of an immutable class and I am confused on how to write the method so that vect can be modified.
/**
* If active is true: moves _local by vect
* If active is false: rotate vect by 6.
*/
public void steep() {
if (active == true) {
vect.move(_local);
} else {
vect.rotate(6);
}
}
Solution
Could you please share the code with us?So that We can provide you the soultion with proper justice.
