Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SpeedcubeTimeRecorder extends ConsoleProgram
- {
- public int timerCount = 0;
- public void run()
- {
- CubeType [] myTimers = new CubeType [10];
- while(true)
- {
- /**takes user input for a certain path of action until 'end'
- * is entered
- */
- String menuEntry = readLine("Type 'enter', 'end', or 'edit' to continue.");
- if(menuEntry.equals("enter"))
- {
- timeEnter();
- }
- if(menuEntry.equals("end"))
- {
- break;
- }
- if(menuEntry.equals("edit"))
- {
- double timeChange = readDouble("What would you like to change the time to?");
- }
- }
- }
- /**
- * asks user for inputs, and assigns them to an ascending order
- * object of an array on each calling
- */
- public void timeEnter()
- {
- String typeEntry = readLine("What kind of cube is it?");
- double timeEntry = readDouble("What time did you get?");
- boolean plusTwoEntry = readBoolean("Did you get a plus two?");
- myTimers [timerCount] = new CubeType(typeEntry, timeEntry, plusTwoEntry);
- timerCount++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement