Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

Part II

Override toString and equals in both of the derived classes. The toString method must display all of the information in the object. Two Employee objects are equal if they have the same job title. Two Customer objects are equal if they are corporate customers who work for the same company.

Create a test application (PeopleTester.java) that populates an ArrayList with 10 people. Use all three classes and be sure to test all paths of equals execution (i.e., ensure 100% test coverage).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

What are the key differences between the major data mining methods?

Answered: 1 week ago

Question

Be able to suggest some future options for human resources

Answered: 1 week ago

Question

1. Who will you assemble on the team?

Answered: 1 week ago

Question

4. Who would lead the group?

Answered: 1 week ago