HomeChallengesRepsProblemsLeaderboardTake a challenge

Which method runs?

A notification service sends member alerts over SMS, WhatsApp and USSD, using virtual, override and new all at once. Predict the eight lines it prints without running it.

Intermediate10 min on the clock5 graded checks · 100 pointsObjects That VaryPro
Graded by reading your code against the checklist below.

What you build

  • Read Notices.cs and Program.cs without changing them
  • Fill Expected with the eight lines it prints, exactly

Done means

All eight predicted lines match the program’s output exactly.

How it is graded

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

  1. Lines 1 and 4: virtual through a base reference+20Which method actually runs
  2. Lines 2 and 3: non-virtual, two declared types+20Which method actually runs
  3. Line 5: a hidden method called from base code+25Which method actually runs
  4. Lines 6 and 7: new through base and derived references+20Which method actually runs
  5. Line 8: base code, hidden method, unreplaced slot+15Which method actually runs

What it teaches

The rest of Objects That Vary