Skip to content
A Programmer edited this page Feb 13, 2024 · 3 revisions

Policies Class

This class is designed to act as the policy information retention, with each feature changing the system's values.

Author: Tejae

Class Attributes:

policyID: An integer representing the policy's ID.

clientID: An integer representing the client's ID associated with the policy.

vehicleID: An integer representing the vehicle's ID associated with the policy.

policyNumber: An integer representing the policy number.

startDate: A string representing the start date of the policy.

endDate: A string representing the end date of the policy.

coverageType: A string representing the type of coverage.

policyStatus: A string representing the status of the policy.

Premium: A double representing the premium amount.

Deductible: A double representing the deductible amount.

Constructors:

public Policy(): Default constructor for general technical operations, initializing attributes with default values.

public Policy(int policyID, int policyNumber, String coverageType, String policyStatus, double Premium): Constructor for creating an unregistered policy with specified values.

public Policy(int policyID, int policyNumber, String startDate, String endDate, String coverageType, String policyStatus, double Premium, double Deductible): Constructor for creating an unregistered policy with start and end dates and deductibles.

public Policy(int policyID, int clientID, int vehicleID, int policyNumber, String startDate, String endDate, String coverageType, String policyStatus, double Premium, double Deductible): Constructor for creating a registered policy with client and vehicle information.

Getter and Setter Methods and etc:

getPolicyID() - Gets Policy ID

setPolicyID() - Sets Policy ID

getClientID() - Gets Client ID

setClientID() - Sets Client ID

Override toString: Overrides the toString method to provide a formatted string representation of the Policy object.

Clone this wiki locally