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

Advisor Class

Advisor is a subclass of the User class. It introduces two new fields: List clients to store a list of clients and List managedClaims to store a list of managed claims. Mainly Used to deal with managing claims and others.

Author: Jiaye Chen

Additional Subset Elements

clients: A list of Customer objects representing the clients associated with the advisor.

managedClaims: A list of Claims objects representing the claims managed by the advisor.

Constructor:

public Advisor(int userID, String passwordKey, String firstName, String lastName, String email): Constructor that initializes the Advisor object with user-specific information and initializes the clients and managedClaims lists.

Methods:

addClient(Customer client): Method to add a client to the list of clients.

removeClient(Customer client): Method to remove a client from the list of clients.

manageClaim(Claims claim): Method to add a claim to the list of managed claims.

unmanageClaim(Claims claim): Method to remove a claim from the list of managed claims. Getter Methods:

getClients(): Returns the list of clients associated with the advisor.

getManagedClaims(): Returns the list of claims managed by the advisor.

Override toString Method: Overrides the toString method to include user-specific information from the superclass (User) and provides a customized string representation for the Advisor class.

Usage Notes:

This class extends the User class, inheriting its attributes and methods while adding functionality specific to an advisor, such as managing clients and claims.

Clone this wiki locally