Task 3: Complete the Job Class

Now open the Job file. OOF! There are a lot of fields declared and not much else.

  1. Code a constructor to initialize the id field with a unique value. This constructor should take no parameters.

  2. Code a second constructor that takes 5 parameters and assigns values to name, employer, location, positionType, and coreCompetency. Also, this constructor should call the first in order to initialize the id field. Make sure the parameters are defined in the specified order.

  3. Generate getters and setters for each field EXCEPT nextID and id.

  4. Generate a getter for the id field.

  5. Generate the equals and hashCode methods. Consider two Job objects equal when their id fields match.

Tip

Now would be a good time to save, commit, and push your work up to GitHub.

Next