This is the whole thing: the three-certificate cession written as one small
Cedefunction, the seven claims it maps, and the two totals it must hit. The exercise hands you the same book with an emptyCede— you write the body.
The cession is nothing but a lookup that returns a negative amount for the three ceded claims and 0 for everyone else. There is no net-column logic to write: net = gross + Cede(claim) does it, exactly as in the lesson's stub cession — the only thing that changed is that Cede now returns something other than 0.
The cession, in three lines
static double Cede(string claim) => claim switch
{
"C3" => -60.0, // certificate on C3
"C4" => -100.0, // certificate on C4
"C5" => -200.0, // certificate on C5
_ => 0.0, // everything else — including ATT — retained in full
};
The _ arm is the important one: it retains C1, C2, C6 and the attritional bulk by returning 0. Nothing special guards the attritional row — it simply is not one of the three named certificates, so it cedes nothing and its net stays 350. That is the individual-vs-attritional distinction doing its quiet work: a per-claim certificate names claims, and ATT is not a claim.
What the totals prove
- Individual net = 80 + 240 + 360 + 660 + 1,100 + 90 = 2,530 = 2,890 gross − 360 ceded.
- Book net = 2,530 + 350 = 2,880 = 3,240 gross + (−360) ceded.
Both totals fall straight out of summing the net column — no subtraction, no separate ceded table. That is the payoff of storing ceded as a negative amount.
Live and green
Press Run — seven rows and both total lines ✓.
Implement the Cede lookup for the three facultative certificates — C3 cedes 60, C4 cedes 100, C5 cedes 200, all stored negative, everything else 0 — so all seven claim rows hit their expected nets. Show the battery as a grid with a result column, and check that the individual net totals 2,530 and the book net 2,880.
Notice what you did not write: no if net < 0, no separate subtraction step, no special case for the attritional row beyond letting it fall through to 0. The sign convention absorbed all of it — which is exactly why the next lessons can stack quota shares and layers on top by plain summing.
← Back to the exercise · Lesson 1 — From gross to net · All solutions