Skip to content

Project exam · C# and .NET

Project exam: hostel mess billing

Project examintermediate· about 1.5 hours· 6 steps· 90 min · pass 70%

The brief

A timed, hands-on exam. The warden of a college hostel needs October's mess bills from the meal register. In 90 minutes you set up the project, parse the register safely, bill each student with exceptions for impossible counts, summarise with LINQ, save to JSON and pass the given tests. You paste what your program prints for each task; no hints or answers are shown until you hand it in.

Why it matters

Many .NET interviews now include a timed take-home or live coding task just like this: messy input, money rules, a report and tests, in limited time. Practising under the clock shows you which parts you can already do quickly and which you still need to look up.

Skills you practise

  • dotnet CLI
  • records
  • Split and int.TryParse
  • exceptions
  • LINQ (Sum, Max, Average, Where)
  • System.Text.Json
  • dotnet test

You need

  • .NET 8 SDK or newer, already installed and working (check dotnet --version before you start the timer)
  • A code editor, and 90 minutes without interruptions

What you will have at the end

The MessWork folder with the MessBill console app (parsing, billing with exceptions, a LINQ summary and a JSON file) and MessBill.Tests with five passing tests, finished within 90 minutes.

How it is marked (rubric, 100 points)
Correct billsTasks 2 and 3 pass: the bad line is skipped and every bill is right, including the student on leave and the impossible count.40
Summary and storageTasks 4 and 5 pass: the total, highest and average are right, and the JSON round-trip keeps every bill.25
Tests passAll five given tests pass without being changed.20
Code quality under timeRules live in MessCalculator, Program.cs only reads and prints, and nothing crashes on bad input.15
  • 6tasks
  • 90 mintime limit
  • 70%to pass

Rules: a project exam

  • Do each task on your own machine, then paste the command output into its box here.
  • Work alone, without notes or a search engine, as in the real exam.
  • No hints and no answers. You can run your code, but the checks run only when you hand in.
  • Every task is checked automatically when you hand in, or when the time is up.
  • You see which tasks passed at the end. You can take it again.
Not yet, go back