Define two enum, first for Gender and another for Month. Gender shall be enumeration of two values i.e. Male and Female. Month enum shall be defined with January, February, ... up to December as values. Month enum shall also store the number of days of each month.Define a User that shall be composed of id, name, gender and birthMonth attributes. Use above created enums for gender and birthMonth fields. Create a User object and initialize it from user input, gender shall be initialized in constructor and birthMonth shall be initialzed using set methed. After the object is initialized, print all fields' values of user object. Also print the number of days of birthMonth.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here