Prototypal Inheritance exercise. Basic Employee List
Employees
Create a two-level prototype chain for creating employees in your business. Start off with an Employee function. Then create two other functions named Clinician, and Operations that have Employee on their prototype chain.
Departments
Create a two-level prototype chain for creating departments in your business. Start off with a Department function. Then create two other functions named FieldOffice, and Headquarters that have Department on their prototype chain.
Requirements
Every employee should have a first and last name. Every department should have a name. Every employee should be assigned to either the FieldOffice or Headquarters department. This is a has-a relationship. Clinician employees should have a property for their area of medical expertise (e.g. physical therapist, phrenologist, anesthesiologist, etc.) Operations employees should have a property for their area of responsibility (e.g. IT, revenue, compliance, etc.) Every field office should have a unique city. Create a minimum of 4 employees - 2 clinicians, and 2 operations - that have been assigned to a specific department. Output the following information to the console for each employee. Full name Department name Expertise/responsibility sample output
Deborah Harris works as a clinician, in the Baltimore field office, and is a phrenologist. Michael Slazinski works in operations, in headquarters, and is responsible for compliance. Margaret Johnson works as a clinician, in the Indianapolis field office, and is a physical therapist.