[Data Modeling]
You are a Pega developer working on an insurance application. The application needs to manage different types of insurance policies such as car insurance, home insurance, and life insurance. Each type of insurance policy has some common attributes (policy number, policyholder name, and premium amount), but also has some unique attributes (such as vehicle details for car insurance, property details for home insurance, and beneficiary details for life insurance).
Which one of the following approaches to handling this scenario would be most appropriate in a Pega application?
- Create a single class for all types of insurance policies and dynamically add or remove attributes as needed.
- Create a single class for all types of insurance policies and define all possible attributes.
- Create a base class for the insurance policy for the common attributes, and then create derived classes for each type of insurance policy with their unique attributes.
- Create a separate class for each type of insurance policy and then define the common attributes in the new class.
Reveal Solution
Next Question