|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectassignment2.Cube
public class Cube
| Constructor Summary | |
|---|---|
Cube(java.lang.String s)
Construct cube from string, each face of the cube is one character of the string, but "Q" is replaced by "Qu" in making a cube |
|
Cube(java.lang.String[] faces)
Construct cube from an array of strings where each entry of the array represents a face of the cube. |
|
| Method Summary | |
|---|---|
java.lang.String |
getRandomFace()
Return a random face of the cube, effectively "rolling" the cube and returning the value shown. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Cube(java.lang.String[] faces)
faces - is array of values, one per face of cubepublic Cube(java.lang.String s)
s - is string that is the source of
values for the cube's faces| Method Detail |
|---|
public java.lang.String getRandomFace()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||