Advertisement
scaawt

Clock24

Nov 14th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. /**
  2. * Auto Generated Java Class.
  3. */
  4. public class Clock24 {
  5.  
  6. public int hours;
  7. public int minutes;
  8. private boolean isAM;
  9.  
  10. //defaults
  11. public Clock24()
  12. {
  13. int hours = 0;
  14. int minutes = 0;
  15. boolean isAM = false;
  16. }
  17.  
  18.  
  19. //parameterized constructors
  20. public Clock24 (int aHours, int aMinutes)
  21. {
  22. this.setHours (aHours);
  23. this.setMinutes (aMinutes);
  24. }
  25.  
  26. //accessors
  27. public int getHours ()
  28. {
  29. return this.hours;
  30. }
  31.  
  32. public int getMinutes ()
  33. {
  34. return this.minutes;
  35. }
  36.  
  37. public boolean getIsAm ()
  38. {
  39. return this.isAM;
  40. }
  41.  
  42. //mutators
  43. public void setHours (int aHours)
  44. {
  45. if (aHours >= 0)
  46. {
  47. this.hours = aHours;
  48. }
  49. }
  50.  
  51. public void setMinutes (int aMinutes)
  52. {
  53. if (aMinutes >= 0)
  54. {
  55. this.minutes = aMinutes;
  56. }
  57. }
  58.  
  59. public void isAM (boolean amIs)
  60. {
  61. this.isAM = amIs;
  62. }
  63.  
  64. //other methods
  65.  
  66. //setTime
  67. public void setTime (int aTime)
  68. {
  69. }
  70.  
  71.  
  72.  
  73.  
  74.  
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement