\chapter{Logical view}

\section{Primary presentation}
\begin{figure}[h]
    \begin{center}
        \includegraphics*[angle=270, width=13cm, keepaspectratio]{Images/ClassDiagram.eps}
        \caption{Class Diagram}
    \end{center}
\end{figure}
A larger image can be found in appendix \ref{appendixa}, Class Diagram Large.

\section{Element catalog}
This section describes all of the classes in the class diagram as
shown above. Each class description contains a general purpose of
the class, the attributes of the class, the operations of the class
and the relations with other classes. At the end of the class descriptions,
three data types are described.

\subsection*{Person}
This class is a general class which specifies the common attributes
for a person.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT0101 & name & Represents the name of the person \\
  \hline
  AT0102 & address & Represents the address of the person\\
  \hline
  AT0103 & telephone\_nr & Represents the telephone number of the person\\
  \hline
  AT0104 & e-mail & Represents the e-mail address of the person\\
  \hline
  AT0105 & fax\_nr & Represents the fax number of the person\\
  \hline
  AT0106 & mobile\_nr & Represents the mobile number of the person\\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  Employee & - & Generalization \\
  \hline
  Client & - & Generalization \\
  \hline
  WebsiteUser & - & Generalization \\
  \hline
  Representative & - & Generalization \\
  \hline
  System & * & Known by system  \\
  \hline
\end{longtable}



\subsection*{Employee}
This class represents an employee of TOTAL COVER.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT0201 & employee\_ID & Represents the unique ID number of the employee \\
  \hline
  AT0202 & insurance\_nr & Represents the insurance number of the employee \\
  \hline
  AT0203 & benefit\_structure & Represents the benefit structure the employee has \\
  \hline
  AT0204 & leave\_accrued & Represents the amount of leave the employee has accrued \\
  \hline
  AT0205 & contract\_staff & Represents if the employee is a contract staff \\
  \hline
  AT0206 & career\_steps & Represents the list of career steps of the employee \\
  \hline
  AT0207 & salaries & Represents the list of salary records of the employee \\
  \hline
  AT0208 & timesheets & Represents the list of timesheets of the employee\\
  \hline
  AT0209 & auth\_level & Represents the authorization level of the employee \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP0201 & Employee & Creates a new employee \\
  \hline
  OP0202 & DeleteEmployee & Deletes the employee \\
  \hline
  OP0203 & SearchTimesheet & Searches a specific timesheet of the employee \\
  \hline
  OP0204 & SearchSalary &  Searches a specific salary record of the employee\\
  \hline
  OP0205 & SearchCareerStep & Searches a specific career step of the employee \\
  \hline
  OP0206 & AddCareerStep & Adds a career step of the employee \\
  \hline
  OP0207 & AddSalary & Adds a salary record of the employee \\
  \hline
  OP0208 & AddTimesheet & Adds a timesheet of the employee</p> \\
  \hline
  OP0209 & RemoveCareerStep & Removes a career step of the employee \\
  \hline
  OP0210 & RemoveSalary & Removes a salary record of the employee \\
  \hline
  OP0211 & RemoveTimesheet & Removes a timesheet of the employee \\
  \hline
  OP0212 & CheckAuthorization & Checks if employee has right authorization level \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  Employee & * & Is managed by \\
  \hline
  Employee & * & Manages \\
  \hline
  Timesheet & * & Has time sheets\\
  \hline
  Salary & * & Salaries recieved\\
  \hline
  CareerStep & * & Career steps taken \\
  \hline
  Client & * &  Manages\\
  \hline
  ClientType & * & Manages \\
  \hline
  InsurancePackage & * & Manages \\
  \hline
  SingleInsurance & * & Manages \\
  \hline
  InsuranceProposal & * & Responsible for\\
  \hline
  Person & - & Inherits from \\
  \hline
\end{longtable}




\subsection*{Client}
This class represents a client of TOTAL COVER.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT0301 & client\_ID & Represents the unique client number \\
  \hline
  AT0302 & representative\_IDs & Represents the list of representatives of the client and can contain at most 2.  \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{35mm}|p{75mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP0301 & Client & Creates a new client \\
  \hline
  OP0302 & DeleteClient & Deletes the client \\
  \hline
  OP0303 & EditClient & Edits a client \\
  \hline
  OP0304 & QueryClient & Queries a client \\
  \hline
  OP0305 & AddRepresentative & Adds a representative to the representative list \\
  \hline
  OP0306 & RemoveRepresenative & Removes a representative from the list \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  Representative  & * & Is represented by \\
  \hline
  Employee  & 1 & Managed by  \\
  \hline
  ClientType  & 1 & Is of type \\
  \hline
  InsurancePolicy  & 1..* & Has  \\
  \hline
  InsuranceProposal  & 1..* & Has \\
  \hline
  Payment  & * & Made \\
  \hline
  Person  & - & Inherits from \\
  \hline
\end{longtable}



\subsection*{Representative}
This class represents a representative of a client.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT0401 & representative\_ID & Represents the unique representative number \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{33mm}|p{77mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP0401 & Representative & Creates a new representative \\
  \hline
  OP0402 & DeleteRepresentative & Deletes the representative \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  Person & - & Inherits from \\
  \hline
  Client & 1 & Represents \\
  \hline
\end{longtable}



\subsection*{WebsiteUser}
This class represent a registered user of the website.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT0501 & user\_ID & Represents the unique website user number \\
  \hline
  AT0502 & login\_name & Represents the login name of the website user \\
  \hline
  AT0503 & password & Represents the password of the website user \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP0501 & WebsiteUser & Creates a new website user \\
  \hline
  OP0502 & DeleteWebsiteUser & Deletes the website user \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  InsuranceProposal & 0..1 & Has \\
  \hline
  Person & - & Inherits from \\
  \hline
\end{longtable}



\subsection*{System}
This class represents the system which has common and high level
operations.

The class operations are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP0601 & LoginWebsiteUser & Does login a website user\\
  \hline
  OP0602 & LoginEmployee & Does login an employee \\
  \hline
  OP0603 & SearchCaller & Searches the callers details if available \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  Person & * & Knows about\\
  \hline
\end{longtable}



\subsection*{Timesheet}
This class represents a time sheet that an employee filled in for a
particular work day.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT0701 & timesheet\_ID & Represents the unique timesheet number \\
  \hline
  AT0702 & ts\_date & Represents the date for which the timesheet is about \\
  \hline
  AT0703 & hours\_worked & Represents the number of hours the employee worked on that day \\
  \hline
  AT0704 & hours\_leave & Represents the number of hours the employee took leave that day \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP0701 & Timesheet & Creates a new timesheet \\
  \hline
  OP0702 & DeleteTimesheet & Deletes the timesheet \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  Employee & 1 & Is of \\
  \hline
\end{longtable}



\subsection*{Salary}
This class represents a salary record of an employee.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT0801 & salary\_ID & Represents the unique salary record number  \\
  \hline
  AT0802 & tax\_percentage & Represents the tax percentage calculated over the salary \\
  \hline
  AT0803 & salary\_amount & Represents the salary amount of the salary record \\
  \hline
  AT0804 & salary\_date & Represents the payment date of the salary \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP0801 & Salary & Creates a new salary record \\
  \hline
  OP0802 & DeleteSalary & Deletes the salary record \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  Employee & 1 & Is of \\
  \hline
\end{longtable}



\subsection*{CareerStep}
This class represents a career step which an employee has taken.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT0901 & step\_ID & Represents the unique career step number \\
  \hline
  AT0902 & job\_function & Represents the job function of the employee in the career step \\
  \hline
  AT0903 & step\_begin\_date & Represents the begin date of the career step \\
  \hline
  AT0904 & step\_end\_date & Represents the end date of the career step \\
  \hline
  AT0905 & step\_info & Represents additional info about the career step \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP0901 & CareerStep & Creates a new career step \\
  \hline
  OP0902 & DeleteCareerStep & Deletes the career step \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  Employee & 1 & Is of \\
  \hline
\end{longtable}



\subsection*{ClientType}
This class represents a type of the client.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT1001 & client\_type\_ID & Represents the unique client type number \\
  \hline
  AT1002 & type\_name & Represents the name of the client type \\
  \hline
  AT1003 & type\_info & Represents info about the client type \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP1001 & ClientType & Creates a new client type \\
  \hline
  OP1002 & DeleteClientType & Deletes the client type \\
  \hline
  OP1003 & EditClientType & Edits a client type \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  Client & * & Describes type for\\
  \hline
  SingleInsurance & * & Describes type for \\
  \hline
\end{longtable}




\subsection*{Insurance}
This class represents the common operations and attributes of an
insurance.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT1101 & insurance\_ID & Represents the unique insurance number \\
  \hline
  AT1102 & cross\_sell\_IDs & Represents the list of insurance IDs which are cross-sell opportunities for this insurance \\
  \hline
  AT1103 & up\_sell\_IDs & Represents the list of insurance IDs which are up-sell opportunities for this insurance \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{50mm}|p{60mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP1101 & AddUpSell & Adds a up sell opportunities to the list \\
  \hline
  OP1102 & AddCrossSell & Adds a cross sell opportunities to the list \\
  \hline
  OP1103 & RemoveUpSell & Removes a up sell opportunities to the list \\
  \hline
  OP1104 & RemoveCrossSell & Removes a cross sell opportunities to the list \\
  \hline
  OP1105 & CheckCrossSellOpportunities & Checks for proposals which apply to a new cross opportunities \\
  \hline
  OP1106 & CheckUpSellOpportunities & Checks for proposals which apply to a new up sell opportunities\\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  SingleInsurance & - & Inherits from \\
  \hline
  InsurancePackage & - & Inherits from \\
  \hline
  InsuranceProposal & * & Used in \\
  \hline
\end{longtable}




\subsection*{SingleInsurance}
This class represents a single insurance which can be used in an
insurance proposal.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT1201 & insurance\_name & Represents the name of the single insurance \\
  \hline
  AT1202 & insurance\_info & Represents the info about the single insurance \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{35mm}|p{75mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP1201 & SingleInsurance & Creates a new single insurance \\
  \hline
  OP1202 & DeleteSingleInsurance & Delete the single insurance \\
  \hline
  OP1203 & EditSingleInsurance & Edit the single insurance  \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  SingleInsurance & * & Is up-sell for \\
  \hline
  SingleInsurance & * & Has up-sell \\
  \hline
  SingleInsurance & * & Is cross-sell for \\
  \hline
  SingleInsurance & * & Has cross-sell \\
  \hline
  InsurancePackage & * & Is in \\
  \hline
  ClientType & 1 & Is of type \\
  \hline
  Employee & 1..* & Managed by \\
  \hline
  Insurance & - & Inherits from \\
  \hline
\end{longtable}




\subsection*{InsurancePackage}
This class represents an insurance package.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT1301 & package\_name & Represents the name of the insurance package\\
  \hline
  AT1302 & package\_info & Represents the info about the insurance package \\
  \hline
  AT1303 & insurance\_IDs & Represents the list of insurances contained in the package \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{45mm}|p{65mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP1301 & InsurancePackage & Creates a new insurance package \\
  \hline
  OP1302 & DeleteInsurancePackage & Deletes the insurance package \\
  \hline
  OP1303 & EditInsurancePackage & Does edit the insurance package \\
  \hline
  OP1304 & QueryInsurancePackage & Does query the insurance package  \\
  \hline
  OP1305 & AddInsurance & Adds an insurance to the list \\
  \hline
  OP1306 & RemoveInsurance & Removes an insurance from the list\\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  SingleInsurance & 1..* & Contains \\
  \hline
  Employee & * & Is managed by \\
  \hline
  Insurance & - & Inherits from \\
  \hline
\end{longtable}




\subsection*{InsuranceProposal}
This class represents an insurance proposal created for a client or
website user.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT1401 & proposal\_ID & Represents the unique insurance proposal number \\
  \hline
  AT1402 & risks & Represents the list of risks which the insurance proposal insures \\
  \hline
  AT1403 & premium\_amount & Represents the premium amount for the insurance proposal \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{45mm}|p{65mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP1401 & InsuranceProposal & Creates a new insurance proposal \\
  \hline
  OP1402 & DeleteInsuranceProposal & Deletes the insurance proposal \\
  \hline
  OP1403 & QueryInsuranceProposal & Queries the insurance proposal \\
  \hline
  OP1404 & CalculateInsuranceProposal & Calculates a premium amount \\
  \hline
  OP1405 & ConvertToPolicy & Converts the proposal into a policy \\
  \hline
  OP1406 & AddRisk & Adds a risk to the list\\
  \hline
  OP1407 & RemoveRisk & Removes a risk from the list \\
  \hline
  OP1408 & CheckForUpSell & Checks for up sell opportunities when proposal is created \\
  \hline
  OP1409 & CheckForCrossSell & Checks for cross sell opportunities when proposal is created \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  Employee & 1 & Responsible employee \\
  \hline
  WebsiteUser & 1 & Is proposed to \\
  \hline
  Client & 1 & Is proposed to \\
  \hline
  Risk & 1..* & Insures \\
  \hline
  Insurance & 1 & Is of type \\
  \hline
  InsurancePolicy & 1 & Is converted in \\
  \hline
\end{longtable}




\subsection*{InsurancePolicy}
This class represents an insurance policy of a client.

The class attributes are:
\begin{longtable}{|p{12mm}|p{40mm}|p{70mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT1501 & policy\_ID & Represents the unique policy number \\
  \hline
  AT1502 & issue\_frequency & Represents the frequency with which the policy is issued \\
  \hline
  AT1503 & begin\_date & Represents the begin date of the policy \\
  \hline
  AT1504 & end\_date & Represents the end date of the policy \\
  \hline
  AT1505 & details\_excess\_payment & Represents the details of excess payment \\
  \hline
  AT1506 & obligation\_terms & Represents the obligation terms of the policy \\
  \hline
  AT1507 & claim\_IDs & Represents the list of claims of the policy \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{50mm}|p{60mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP1501 & InsurancePolicy & Creates a new insurance policy \\
  \hline
  OP1502 & DeleteInsurancePolicy & Deletes the insurance policy \\
  \hline
  OP1503 & QueryInsurancePolicy & Queries the insurance policy \\
  \hline
  OP1504 & EditInsurancePolicy & Edits the insurance policy \\
  \hline
  OP1505 & GenerateGovernmentReport & Generates a government report \\
  \hline
  OP1506 & RemoveClaim & Removes a claim from the list \\
  \hline
  OP1507 & AddClaim & Adds a claim to the list \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  InsuranceProposal & 1 & Is converted from \\
  \hline
  PaymentInfo & 1 & Has \\
  \hline
  Claim & * & Has \\
  \hline
  Client & 1 & Is policy of \\
  \hline
  Payment & * & Has \\
  \hline
\end{longtable}




\subsection*{Risk}
This class represents a risk which is insured by a proposal.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT1601 & risk\_ID & Represents the unique risk number \\
  \hline
  AT1602 & risk\_name & Represents the name of the risk \\
  \hline
  AT1603 & risk\_info & Represents a description of the risk \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP1601 & Risk & Creates a new risk \\
  \hline
  OP1602 & DeleteRisk & Deletes the risk \\
  \hline
  OP1603 & EditRisk & Does edit the risk \\
  \hline
  OP1604 & QueryRisk & Queries the risk \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  InsuranceProposal & 1 & Insured by \\
  \hline
\end{longtable}




\subsection*{Claim}
This class represents a claim for an insurance policy.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT1701 & claim\_ID & Represents the unique claim number \\
  \hline
  AT1702 & claim\_date & Represents the date of the claim \\
  \hline
  AT1703 & claim\_info & Represents a description of the claim \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP1701 & Claim & Creates a new claim \\
  \hline
  OP1702 & DeleteClaim & Deletes the claim \\
  \hline
  OP1703 & EditClaim & Does edit the claim \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  InsurancePolicy & 1 & Issued for \\
  \hline
\end{longtable}




\subsection*{PaymentInfo}
This class represent payment info for an insurance policy.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT1801 & payment\_info\_ID & Represents the unique payment info number \\
  \hline
  AT1802 & payment\_frequency & Represents the frequency with which payment is done \\
  \hline
  AT1803 & payment\_method & Represents the method of payment of the client for the policy \\
  \hline
  AT1804 & payment\_renewal & Represents the method of renewal which is automatic or manually \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP1801 & PaymentInfo & Creates a new payment info \\
  \hline
  OP1802 & DeletePaymentInfo & Deletes the payment info\\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  InsurancePolicy & 1 & Is about \\
  \hline
\end{longtable}



\subsection*{Payment}
This association class indicates a payment paid by a client for a
particular insurance policy.

The class attributes are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Attribute name} & \textbf{Description} \\
  \hline
  AT1901 & payment\_ID & Represents the unique payment number \\
  \hline
  AT1902 & payment\_date & Represents the date when the payment was made \\
  \hline
  AT1903 & method & Represents the method of payment \\
  \hline
  AT1904 & amount & Represents amount of the payment \\
  \hline
\end{longtable}

The class operations are:
\begin{longtable}{|p{12mm}|p{30mm}|p{80mm}|}
  \hline
  \textbf{ID} & \textbf{Operation name} & \textbf{Description} \\
  \hline
  OP1901 & Payment & Creates a new payment \\
  \hline
  OP1902 & DeletePayment & Deletes the payment \\
  \hline
  OP1903 & QueryPayment & Queries the payment \\
  \hline
  OP1904 & EditPayment & Does edit a payment \\
  \hline
\end{longtable}

This class has the following relations:
\begin{longtable}{|p{30mm}|p{20mm}|p{70mm}|}
  \hline
  \textbf{Related with} & \textbf{Multiplicity} & \textbf{Description} \\
  \hline
  Client & 1 & Fs from \\
  \hline
  InsurancePolicy & 1 & Is about \\
  \hline
\end{longtable}


\newpage
The following sections will describe the data types used in the class diagram which aren't standard.
All data types introduced here are enumerations.

\subsection*{p\_frequency}
Data type which enumerates the different frequencies by which a payment can be made.
  \begin{longtable}{|p{30mm}|p{90mm}|}
  \hline
  \textbf{ID} & \textbf{Enumeration} \\
  \hline
  DT0001    & daily, weekly, fortnightly, monthly, quarterly and yearly \\
  \hline
\end{longtable}

\subsection*{i\_frequency}
Data type which enumerates the different frequencies by which a policy can be issued.
  \begin{longtable}{|p{30mm}|p{90mm}|}
  \hline
  \textbf{ID} & \textbf{Enumeration} \\
  \hline
  DT0002    & monthly, quarterly, half-yearly and yearly\\
  \hline
\end{longtable}

\subsection*{method}
Data type which enumerates the different methods of payments.
  \begin{longtable}{|p{30mm}|p{90mm}|}
  \hline
  \textbf{ID} & \textbf{Enumeration} \\
  \hline
  DT0003    & cash, check and credit card \\
  \hline
\end{longtable}


\section{Context diagram}
N/A

\section{Variability guide}
All of the operations are points of variability because none of the
parameters are decided yet. This will be done in the "detailed
design phase" of the project. The return type of most of the
operations are also declared in this phase of the project.

The "Edit..." operations in a class are generalizations of all the
"Set..." operations of attributes.

\section{Architectural background}
\subsection{Rationale}
All of the mayor entities in the requirements are modeled as a
class, this is how the classes were generated.

Because of the 4 kinds of person types in the requirements
(\textit{employee}, \textit{client}, \textit{website user} and
\textit{representative}), we decided to make one \textit{person}
class with all general information. Via generalization we attached
the 4 types to it.

Because of the 2 kinds of insurances in the requirements
(\textit{single insurances} and \textit{insurance packages}), we
decided to make one \textit{insurance} class with all general
information. Via generalization we attached both types to it.

An \textit{employee} has time sheets, salaries and career steps
attached to him, because of administration and career tracking
purposes.

A \textit{client} is attached to his insurance policies and
proposals. If the client has any representatives, they will be
denoted as a \textit{representative}. A person can both be in the
system as a representative and as a client. The information will not
be shared.

An insurance proposal insures one or more risks, but is only of one
type of insurance (either a single insurance or an insurance
package). Once a proposal is converted to a policy, the proposal
will still be used to describe the type of insurance and the insured
risks.

An insurance proposal created via the website can't be converted to
policy. The policy can only be attached to a client.

Because a payment is concerned with a client-policy pair, it has
been modeled as a association class.

Client type indicates if a client is an organization or not and
indicates for what type of client an insurance is meant for.

The higher level person operations, like identifying a caller,
are in the \textit{system} class.

\subsection{Assumptions}
\begin{itemize}
  \item Every Insurance policy is converted from an Insurance proposal.
  \item Every Insurance proposal remains stored after conversion,
        because it contains the details about risks,
        premiumInfo and type of insurance.
  \item Premium amount is stored as �/month.
  \item An insurance policy and insurance proposal is for one single
        insurance or for one insurance package.
  \item Website users must log-in (and register) before they can make insurance proposals.
  \item An insurance proposal remains stored in the system if the attached policy is deleted,
        because of reuse.
  \item Insurance proposals made for a website user can't be
        converted to a policy.
\end{itemize}

\section{Other information}
N/A