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
-
1Console project, broken on purposeCreate 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.
-
2The converter that survives garbageAsk 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.
-
3Loop and LINQ, same answersA 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.
-
4Port the OOP designStudent 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.
-
5The complete trackerMenu 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.
-
6Explain it, and read the marketExplain 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
| Criterion | Points |
|---|---|
| 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 |
صورتحال
C# میں مکمل console فیس tracker بنائیں: ایک menu loop، ایک FeeBook جو list اور اصولوں کی مالک ہو، guarded payments اور computed balances والے Students، ایک interface کے پیچھے policies، ہر تبدیلی پر JSON save اور شروع میں load، اور ہر guard crash کے بجائے شائستہ پیغام میں بدلا ہوا۔ پھر اس کا ڈھانچہ دو منٹ میں سمجھانے کی مشق کریں، اور ایک حقیقی NETSOL یا Autosoft posting highlighter کے ساتھ پڑھیں۔
آپ کیا دکھا سکیں گے
- compiler errors کو درست ہدایات کے طور پر پڑھنا اور جلدی ٹھیک کرنا
- TryParse سے input محفوظ طریقے سے parse کرنا اور بے کار input پر کبھی crash نہ ہونا
- classes، interfaces اور generic lists سے model بنانا جنہیں compiler نافذ کرے
- JSON سے محفوظ رکھنا اور پہلی بار چلنے کی صورت سنبھالنا
- project کا ڈھانچہ بلند آواز میں سمجھانا
آپ کو کیا چاہیے
- .NET SDK، C# Dev Kit کے ساتھ VS Code
- policies کے لیے آپ کا oop-fundamentals کا design
- کسی پاکستانی software house کی ایک حقیقی job posting
کام
-
1console project، جان بوجھ کر ٹوٹا ہواconsole project بنائیں اور چلائیں۔ message بدلیں۔ ایک semicolon ہٹائیں، دوبارہ چلائیں، اور ٹھیک کرنے سے پہلے compiler error کی file، line اور message پڑھیں۔درست نتیجہ: چلتا ہوا project اور آپ کا پڑھا ہوا بالکل درست error متن، اس کی line کے ساتھ۔
-
2وہ converter جو بے کار input سے بچ جائےConsole.ReadLine سے فیس کی رقم اور اقساط کی تعداد پوچھیں۔ دونوں کو TryParse کریں، غلط input شائستگی سے رد کریں، فی قسط رقم decimal میں نکالیں، :N0 سے print کریں۔ اسے حروف، خالی اور منفی دیں۔درست نتیجہ: تین بے کار inputs پیغامات کے ساتھ سنبھالے گئے؛ app کبھی crash نہیں ہوتی۔
-
3loop اور LINQ، ایک جیسے جوابچھ courses اور فیسوں کی Dictionary<string, decimal>۔ loop سے total، پھر LINQ Sum سے۔ filtered sorted list (50,000 سے اوپر کی فیسیں) loop سے، پھر Where اور OrderBy سے۔ تصدیق کریں کہ دونوں انداز ایک جیسے جواب دیتے ہیں۔درست نتیجہ: دو totals برابر، دو filtered lists برابر، اور ایک جملہ کہ کون سا بہتر پڑھا جاتا ہے۔
-
4OOP design منتقل کریںguarded Pay اور computed Balance والا Student؛ Regular، Installment اور Scholarship کے ساتھ IFeePolicy؛ ایک List<Student> جس میں ہر ایک کی policy ہو؛ ایک billing loop۔ تصدیق کریں کہ compiler FeePaid کو باہر سے assign کرنے اور list میں غلط type ڈالنے سے انکار کرتا ہے۔درست نتیجہ: دونوں compile errors محفوظ، اور billing loop کا output۔
-
5مکمل trackermenu loop؛ list اور اصولوں کی مالک FeeBook؛ ہر تبدیلی پر JSON save اور شروع میں load، پہلی بار چلنے کی صورت سنبھالی ہوئی؛ try/catch جو آپ کے اپنے throw کیے گئے guards کو شائستہ پیغامات میں بدلے۔ ایک student شامل کریں، app restart کریں، اسے وہیں دیکھیں۔درست نتیجہ: student شامل ہوا، app restart ہوئی، student اب بھی موجود؛ crash کے بجائے guard کا پیغام دکھایا گیا۔
-
6سمجھائیں، اور market پڑھیںproject کا ڈھانچہ دو منٹ میں بلند آواز میں سمجھائیں — کون سی class کس چیز کی مالک ہے، اور کیوں — کسی شخص یا camera کے سامنے۔ پھر ایک حقیقی NETSOL یا Autosoft posting پڑھیں اور ہر وہ اصطلاح highlight کریں جو اس کورس نے مانوس بنائی۔درست نتیجہ: دو منٹ کی وضاحت ہوئی، اور مانوس اصطلاحات کی گنتی کے ساتھ highlight شدہ posting۔
کیا جمع کروانا ہے
solution folder (zip یا repo)، بے کار input کے screenshots، دونوں compile errors، restart کے بعد JSON file، اور highlight شدہ posting۔
نمبر کیسے ملیں گے
| معیار | نمبر |
|---|---|
| compiler error پڑھا اور line کے نام کے ساتھ ٹھیک ہوا | 10 |
| TryParse ہر بے کار input crash کے بغیر سنبھالتا ہے | 15 |
| loop اور LINQ ایک جیسے جواب دیتے ہیں | 10 |
| policies کے ساتھ OOP کی منتقلی اور دونوں compile-time انکار دکھائے گئے | 25 |
| tracker restart پر قائم رہتا ہے اور guards پیغام بنتے ہیں | 25 |
| وضاحت دی گئی اور posting highlight ہوئی | 15 |
| کل · پاس 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 IDAlready have one? Sign in and this course will be added to it.