Introduction
Your last assignments focused on understanding how methods are invoked and how objects interact, including interface specifications. Now, we are going to move in the direction of programming.This assignment asks you to write and compile three class skeletons. Your next assignment, after we review this on Wednesday, will be to fully implement each class.
Please think very carefully about the relationship between each of these classes, the type of each characteristic, the access specifier for each characteristic, and what the behaviors and constructors should be.
The Three Classes: EmployeeRecord, BusinessCard, and AnnualReview
An EmployeeRecord is a class designed to serve as the base for specific types of employee records. It has the following properties:
- It maintains an employee's fullName, SSN, address, title, companyName, and officePhone.
- Initialization requires exactly one of the following
- a fullName and a SSN, or
- all member fields.
- It has the following behaviors:
- The title, address, companyName, and phoneNumber can each, individually, be queried. Each can also be changed.
- The name, and SSN can be individually queried, but not changed.
- It can produce a string representation of itself.
A BusinessCard is a special type of EmployeeRecord:
- It allows only the following properties to be queried: fullName, title, address, companyName, and phoneNumber.
- It allows no properties to be changed.
- It can produce a string representation of itself.
- Initialization requires either the fullName, or each of fullName, title, address, companyName, and phoneNumber.
An AnnualReview is a special type of EmployeeRecord:
- It allows all properties of the EmployeeRecord to be queried.
- Initialization requires each of fullName, title, address, companyName, and phoneNumber.
- It maintains a collection of comments as a string which can be accessed or changed, each with a different method.
- It maintains an overall rating (1, 2, 3, ..., 10) collection, which can be queried or changed.
- It maintains a collection of followUpItems as a string which can be accessed or changed, each with a different method.
- It can produce a string representation of itself.
Notes