C# and .NET Basics · Course lab · about 300 minutes · 6 tasks · marked out of 100, pass at 60

A fee tracker in C# that never crashes on bad input

The situation

Build the complete console fee tracker in C#: a menu loop, a FeeBook that owns the list and the rules, Students with guarded payments and computed balances, policies behind an interface, JSON saved on every change and loaded on start, and every guard turned into a polite message rather than a crash. Then rehearse explaining its structure in two minutes, and read a real NETSOL or Autosoft posting with a highlighter.

What you'll be able to show

  • Read compiler errors as exact directions and fix them fast
  • Parse input safely with TryParse and never crash on garbage
  • Model with classes, interfaces and generic lists the compiler enforces
  • Persist with JSON and handle the first run
  • Explain a project's structure aloud

What you need

  • .NET SDK, VS Code with the C# Dev Kit
  • Your oop-fundamentals design for the policies
  • One real job posting from a Pakistani software house

Tasks

  1. 1Console project, broken on purpose
    Create and run the console project. Change the message. Remove a semicolon, run again, and read the compiler error's file, line and message before fixing it.
    A correct result: A running project and the exact error text you read, with its line.
  2. 2The converter that survives garbage
    Ask for a fee amount and number of instalments with Console.ReadLine. TryParse both, reject bad input politely, compute the per-instalment amount as decimal, print it with :N0. Feed it letters, blanks and negatives.
    A correct result: Three garbage inputs handled with messages; the app never crashes.
  3. 3Loop and LINQ, same answers
    A Dictionary<string, decimal> of six courses and fees. Total with a loop, then with LINQ Sum. A filtered sorted list (fees above 50,000) with a loop, then with Where and OrderBy. Confirm both styles give identical answers.
    A correct result: Two totals equal, two filtered lists equal, and a sentence on which reads better.
  4. 4Port the OOP design
    Student with a guarded Pay and a computed Balance; IFeePolicy with Regular, Installment and Scholarship; a List<Student> each holding a policy; one billing loop. Confirm the compiler refuses outside assignment to FeePaid and adding a wrong type to the list.
    A correct result: The two compile errors captured, and the billing loop's output.
  5. 5The complete tracker
    Menu loop; FeeBook owning the list and rules; JSON save on every change and load on start with the first run handled; try/catch turning your own thrown guards into polite messages. Add a student, restart the app, see them still there.
    A correct result: A student added, the app restarted, the student still present; a guard message shown instead of a crash.
  6. 6Explain it, and read the market
    Explain the project's structure aloud in two minutes — which class owns what, and why — to a person or a camera. Then read one real NETSOL or Autosoft posting and highlight every term this course has made familiar.
    A correct result: The two-minute explanation done, and the highlighted posting with a count of familiar terms.

What to hand in

The solution folder (zipped or a repo), the garbage-input screenshots, the two compile errors, the JSON file after a restart, and the highlighted posting.

How it is marked

CriterionPoints
Compiler error read and fixed with the line named 10
TryParse handles all garbage without a crash 15
Loop and LINQ produce identical answers 10
OOP port with policies and both compile-time refusals shown 25
Tracker persists across restart and guards become messages 25
Explanation given and posting highlighted 15
Total · pass at 60 100

Hand in your lab

Create a free BvLogic ID to hand in your lab, get it marked, and have it on your certificate.

Create your BvLogic ID

Already have one? Sign in and this course will be added to it.