Create enum for departments in an university – FINANCE, NETWORKS, EXAMINATION, are all departments of a university. Use the department enum in employee class. Traversed the department enum and prints the ordinal values. Enhanced enum with a new private instance variable deptCode holding the department code, a getter method for deptCode named getDeptCode(), and a constructor which accepts the department code at the time of enum creation
Comments
Leave a comment