Advertisement
Guest User

chick fil a co.

a guest
Feb 20th, 2020
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. public class Month
  2. {
  3. public Month()
  4. {
  5. month = 0;
  6. days = 0;
  7. text = null;
  8. }
  9.  
  10. public Month(int m)
  11. {
  12. month = m;
  13. days = 0;
  14. text = null;
  15. }
  16.  
  17. public void setMonth(int numInput)
  18. {
  19. month = numInput;
  20. days = 0;
  21. text = null;
  22. }
  23.  
  24. public void convertMonth()
  25. {
  26. if (month == 1)
  27. {
  28. text = "January";
  29. days = 31;
  30. }
  31. else if (month == 2)
  32. {
  33. text = "Feburary";
  34. days = 28;
  35. }
  36. else if (month == 3)
  37. {
  38. text = "March";
  39. days = 31;
  40. }
  41. else if (month == 4)
  42. {
  43. text = "April";
  44. days = 30;
  45. }
  46. else if (month == 5)
  47. {
  48. text = "May";
  49. days = 31;
  50. }
  51. else if (month == 6)
  52. {
  53. text = "June";
  54. days = 30;
  55. }
  56. else if (month == 7)
  57. {
  58. text = "July";
  59. days = 31;
  60. }
  61. else if (month == 8)
  62. {
  63. text = "August";
  64. days = 31;
  65. }
  66. else if (month == 9)
  67. {
  68. text = "September";
  69. days = 30;
  70. }
  71. else if (month == 10)
  72. {
  73. text = "October";
  74. days = 31;
  75. }
  76. else if (month == 11)
  77. {
  78. text = "November";
  79. days = 30;
  80. }
  81. else if (month == 12)
  82. {
  83. text = "December";
  84. days = 31;
  85. }
  86. }
  87.  
  88. public int getDays()
  89. {
  90. return days;
  91. }
  92.  
  93. public String getText()
  94. {
  95. return text;
  96. }
  97.  
  98. private int month;
  99. private int days;
  100. private String text;
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement