write a class named Month. the class have int field named monthNumber that holds the number of the month. For example, January would be 1, February would be 2, and so forth. In addition, provide the following methods :-
- A no-argument constructor that sets the monthNUmber field to 1.
- A construtor that accepts the number of the month as an argrument. it should set the monthNumber field to the value passed as the argument. if a value less than 1 or greater than 12 is passed, the constructor should set monthNumber to 1.
- A constructor that accept the name of the month, such as "January" or "February" as an argument. It should sat the monthNumber field to the correct corresponding value.
- A setMonthNumber() menthod that accept int argument, which is assingned to the monthNumber field. If a value less than 1 or greater than 12 is passed, the method should set monthNumber to 1.
- A getMonthNumber() method that return the value of the monthNUmber field.
- A getMonthName() method that return thr name of the month.For example, if the monthNumber field contain 1, then this method should return "January".
-A toString() method that return the same value as getMonthName method.
- An equals() method that accepts a Month object as an argument. If the argument object holds the same data as the calling object, this method should return true. otherwise, it should return false.
-A greaterThan() that should accepts a Month object as an argument. if the calling object`s monthNumber field is greater than the argement monthNumber field. this method should return true. otherwise it should return false.
- A lessThan() method that accept a Month object as an argument. if the calling object`s monthNumber field that the argument`s monthNumber field, this method should return true, otherwise it should return false.
wtite exception class for the following error conditions :-
- A number less than 1 or greater than 12 is given for the month number.
- An invalid string return is given for the name of the month.
modify the month class so that it throws the appropriate exception when either of these errors occurs. Demonstrate the classes in program.