Question: Create two subclasses: Employee with the following fields: first name, last name, zip, email, employee id, salary, exempt flag, job title, years of service Customer

Create two subclasses:

  • Employee with the following fields: first name, last name, zip, email, employee id, salary, exempt flag, job title, years of service
  • Customer with the following fields: first name, last name, zip, email, customer id, company, customer type (retail or corporate)

NOTE: Exempt means exempt from laws related to overtime pay (these are usually employees that are salaried as opposed to hourly)

Create a Person class that is the base class of the first two.

  • Make sure "users" cannot directly access your fields.
  • Provide at least two constructors per class.
  • Be sure to initialize all fields within the constructor.
  • Provide getters and setters for each field.
  • Fully document your code. Javadoc comments are required above the class and each non-trivial method (i.e., any method that contains behavior that could be unexpected).

Be sure to use camel-case field names and methods based on the names above. The Employee class needs a yearsFullyVested "class variable". Provide the appropriate accessor and mutator. All classes belong in the cis315 package.

NOTE: An employee usually must work for some period of time (e.g., 10 years) before being fully vested in the company's retirement plan.

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!