Advertisement
Guest User

Speedcube Time Recorder

a guest
May 12th, 2022
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. public class SpeedcubeTimeRecorder extends ConsoleProgram
  2. {
  3. public int timerCount = 0;
  4.  
  5. public void run()
  6. {
  7.  
  8. CubeType [] myTimers = new CubeType [10];
  9.  
  10. while(true)
  11. {
  12. /**takes user input for a certain path of action until 'end'
  13. * is entered
  14. */
  15. String menuEntry = readLine("Type 'enter', 'end', or 'edit' to continue.");
  16. if(menuEntry.equals("enter"))
  17. {
  18. timeEnter();
  19. }
  20. if(menuEntry.equals("end"))
  21. {
  22. break;
  23. }
  24. if(menuEntry.equals("edit"))
  25. {
  26. double timeChange = readDouble("What would you like to change the time to?");
  27.  
  28. }
  29. }
  30. }
  31.  
  32. /**
  33. * asks user for inputs, and assigns them to an ascending order
  34. * object of an array on each calling
  35. */
  36. public void timeEnter()
  37. {
  38. String typeEntry = readLine("What kind of cube is it?");
  39. double timeEntry = readDouble("What time did you get?");
  40. boolean plusTwoEntry = readBoolean("Did you get a plus two?");
  41.  
  42. myTimers [timerCount] = new CubeType(typeEntry, timeEntry, plusTwoEntry);
  43. timerCount++;
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement