You are on page 1of 2

Algorithm to compute quotation for a potential policy holder

Definition
carBody ← b
yearManufactured ← m
coverType ← c = 1
constant ← k = 1000
quotation ← q

Procedure computeQuotation(b , m , c)
q = (m + b) * (k *c)
return q
end.

Algorithm to compute premium for a policy holder


Definition
carBody ← b
yearManufactured ← m
coverType ← c = 1
constant ← k1 = 1000
constant ← k 2= 48
quotation ← q
registrationDate ← r
birthDate ← bd
currentDate ←cd
regDateDiff ← df
costOfMaintenance ← cm
annualPremium ← p

Procedure computeAge(bd , cd)


a = cd - bd
return a

Procedure computeRegDateDiff (r , cd)


df = cd - r
return df

Procedure computeCostOfMaintenance (df , k )


cm = (k2/df)
return cm
Procedure computeAnnualPremium(b, m, cm)
If(a>18) //if age is greater than 18
p = (m + b+cm) * (k1 *c)
return p
else
invalid

You might also like