summaryrefslogtreecommitdiffstats
path: root/ADD/chapter3.tex
blob: b4f8c9fb88716cc8d2f0f63e860c7ca12f969524 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
\chapter{Logical view}

\section{Primary presentation}
\begin{figure}[h]
    \begin{center}
        \includegraphics*[angle=270, width=15cm, keepaspectratio]{Images/ClassDiagram.eps}
        \caption{Class Diagram}
    \end{center}
\end{figure}

\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.

\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 \\
  \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}







\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 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