Question: Java Program!!! Design a class named Month. The class should have the following private members: -name: a string object that holds the name ofthe month,

Java Program!!! Design a class named Month. The class should have the following private members: -name: a string object that holds the name ofthe month, such as January. -monthName: an integer value that holds thenumber of the month. For example, January would be 1, Februarywould be 2, and so on. Valid values for this variable should befrom 1 to 12. In addition, provide the following member functions: -a default constructor that sets monthNumber to1 and name to January -a constructor that accepts the name of the month as an argumentand finds and prints how many days in that month. For example,January has 31 days, and so on.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!