HomeChallengesRepsProblemsLeaderboardTake a challenge

Capstone: add the Ethiopian calendar

Add a thirteen-month calendar to the model without editing a single existing class. The Ethiopian calendar has twelve months of 30 days, then Pagume with 5 days — 6 in a leap year, which comes when year % 4 == 3.

Advanced25 min on the clock5 graded checks · 100 pointsDesigning an Object ModelPro
Graded by reading your code against the checklist below.

What you build

  • Add EthiopianCalendar : Calendar in EthiopianCalendar.cs only
  • Override GetName, IsLeapYear, IsLeapDay (13/6) and NextMonth (13 → 1)
  • Run three children through Demonstrate from Program, with the school settings in Answers.cs
  • Edit nothing in Calendar, Date or MonthDay
  • Trace Abebe’s start date and Selam’s first celebration

Done means

One new class overriding all four hooks, the existing classes untouched, the calendar passed in, and both dates traced.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else.

  1. Only a new class was added+25New features without editing old code
  2. All four hooks are overridden, none hidden+20Which method actually runs
  3. Abebe’s start and Selam’s celebration traced+30New features without editing old code
  4. All three calendars run through the same Demonstrate+15Keeping the promises you inherit
  5. The calendar is chosen by passing an object+10Keeping the promises you inherit

What it teaches

Keeping the promises you inheritadvanced

Anywhere the parent works the child must work too — and a subclass that compiles perfectly can still break the first caller who relied on something the parent quietly promised.

The rest of Designing an Object Model