Question: Java Program: Your assignment is to: 1 . RubikFace - Add a ( 3 times 3 ) array to RubikFace that will
Java Program:
Your assignment is to:
RubikFace Add a times array to RubikFace that will hold the colors for each of the facets on the face. For now, set each of the facets to be the same color as the face. You will also have to modify the toString method to return a times grid of colors. If for example, the color of the face was Red, your toString method should return:
R R R
R R R
R R R
Update any methods in RubikRunner or RubikCube that require updating as a result of this change.
Starting with this activity, you need to comment on your code.
Sample Run
W W W
W W W
W W W
B B B O O O G G G
B B O O O G G G
B B B O O O G G G
Y Y Y
Y Y Y
Y Y Y
R R R
R R R
R R R
What direction? q to quit
What direction right left, up down: left
W W W
W W W
W W W
O O O G G GRRRR
O O O G G G R R R
O O O G G G R R R
Y Y Y
Y Y Y
Y Y Y
B B B
B B B
B B B
public class RubikFace
private String color;
public RubikFaceString color
color color;
public String toString
return color.substring;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
