ADVICE:
Start from scratch.
Canibalize carefully!

CS16 Exam #2

Write a class named "XYZ2e" that includes the private data fields specified by the following table, and public methods described below.

DATA ELEMENTS:

METHODS:

Implement get/set methods ONLY as needed for this exam. Also include a four-argument constructor that accepts a value for gross pay, a boolean value for "married", an integer number of additional dependents.

Now, write another ("driver") class whose "main( ... ) method performs the following tasks, to test your "XYZ2e" class:

  1. Create five instances of "XYZ2e" objects, named "a", "b", c", "d", and "e" with ID numbers as follows: 111, 222 ,333, 444 ,555

  2. Set the following data values for each employee:

  3. Calculate and print the number of vacation days remaining for each employee (Display employee ID for each.)

  4. Calculate and print the exemption amount for each employee (with ID number.)