Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Month
- {
- public Month()
- {
- month = 0;
- days = 0;
- text = null;
- }
- public Month(int m)
- {
- month = m;
- days = 0;
- text = null;
- }
- public void setMonth(int numInput)
- {
- month = numInput;
- days = 0;
- text = null;
- }
- public void convertMonth()
- {
- if (month == 1)
- {
- text = "January";
- days = 31;
- }
- else if (month == 2)
- {
- text = "Feburary";
- days = 28;
- }
- else if (month == 3)
- {
- text = "March";
- days = 31;
- }
- else if (month == 4)
- {
- text = "April";
- days = 30;
- }
- else if (month == 5)
- {
- text = "May";
- days = 31;
- }
- else if (month == 6)
- {
- text = "June";
- days = 30;
- }
- else if (month == 7)
- {
- text = "July";
- days = 31;
- }
- else if (month == 8)
- {
- text = "August";
- days = 31;
- }
- else if (month == 9)
- {
- text = "September";
- days = 30;
- }
- else if (month == 10)
- {
- text = "October";
- days = 31;
- }
- else if (month == 11)
- {
- text = "November";
- days = 30;
- }
- else if (month == 12)
- {
- text = "December";
- days = 31;
- }
- }
- public int getDays()
- {
- return days;
- }
- public String getText()
- {
- return text;
- }
- private int month;
- private int days;
- private String text;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement