Question: Java program: Part 2 - Rotate the entire Cube In this part, you will write code to rotate the cube. You will need to implement

Java program:
Part 2- Rotate the entire Cube
In this part, you will write code to rotate the cube. You will need to implement a loop asking the user what direction to rotate in RubikRunner, and implement left(), right(), up() and down() methods in RubikCube that will rotate the cube in the given direction. For example, if the cube looks like:
\[
\begin{array}{l}
\text { W }\\
\text { B O G }\\
\text { Y }\\
\text { R }
\end{array}
\]
and you rotated left, the cube would now look like:
Your assignment is to:
1. RubikCube.java - Implement the 4 commands as void methods - left(), right(), up(), down()
2. RubikRunner.java - add a command loop that asks the user for which direction to turn the cube, including the option to exit the program. After each turn is executed, print out the cube.
3. RubikFace.java - still nothing to do on this one, yet.
Java program: Part 2 - Rotate the entire Cube In

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!