C# Programming
Course Project Assignment
Choose ONE project (A, B, or C) — Individual Assignment
Deadline: July 10, 2026 (2026-07-10), 23:59 Submit to: wp@[Link]
1. General Instructions
1. This is an INDIVIDUAL assignment. Each student must independently choose ONE of the
three projects below (Project A, B, or C) and complete it on their own. You only need to
finish a single project, not all three.
2. All three projects share the same technical requirements, architecture, and grading rubric,
so they are of comparable difficulty. Choose the domain that interests you most.
3. Development environment: C# 12 / .NET 8 SDK, Visual Studio Code (or Visual Studio), and a
console (command-line) application. The database must be SQLite, accessed through the
[Link] package.
4. You may use AI tools to help you write and debug code, but you must fully understand every
line you submit. Be prepared to explain and modify your code during the defense.
5. Submission deadline: July 10, 2026 (2026-07-10), 23:59. Late submissions are penalized.
6. Submit by email to: wp@[Link] (see the Submission Requirements section for the
exact packaging and naming rules).
2. Common Technical Requirements
Whichever project you choose, your solution MUST satisfy all of the following technical
requirements. These mirror the layered design practiced in the comprehensive labs (Labs 15 &
16).
2.1 Required Layered Architecture
Organize the solution into the following layered structure. The UI layer talks to Services, Services
talk to the Data-access (DAO) layer, and the DAO layer talks to SQLite. Entity (model) classes
carry data between layers.
ProjectName/
├── Models/ # Entity classes (one file per entity)
├── Data/ # [Link] + one DAO class per entity (SQLite CRUD)
├── Services/ # Business logic, validation, statistics
├── UI/ # [Link]: menus and user interaction
├── [Link] # Entry point: wires layers together, runs the menu loop
└── [Link] # SQLite database file (created at first run)
2.2 Required Knowledge Points
• Object-Oriented Design (Lessons 06-08): Define a class for each entity with properties, a
constructor, and an overridden ToString(). Use at least one interface OR abstract base class
(for example, a common IRepository<T> interface implemented by your DAO classes, or an
abstract Person/Item base class with derived types).
• Encapsulation: All entity fields are exposed through properties. Validation logic is kept
inside the Service layer, not scattered across the UI.
• Collections (Lesson 09): Use List<T> to hold query results and Dictionary<TKey,TValue> to
build at least one statistical report (for example, totals grouped by category / class /
supplier).
• Exception Handling & Input Validation (Lesson 10): Wrap database calls and all user input
parsing in try/catch. Never let the program crash on bad input (non-numeric text, empty
values, out-of-range numbers, duplicate keys). Show a friendly message and let the user
retry.
• File Operations (Lesson 10): Provide at least one 'Export' feature that writes a report to
a .txt or .csv file using StreamWriter / File methods.
• SQLite Database (Lessons 11-12): Create the schema with CREATE TABLE IF NOT EXISTS at
startup. Implement full CRUD (Create, Read, Update, Delete) using PARAMETERIZED queries
(@param + [Link]). String concatenation in SQL is forbidden.
• Code Standards (Lesson 00, Section VII): PascalCase for classes/methods, camelCase for
local variables, UPPER_SNAKE_CASE for constants, 4-space indentation, and meaningful
names. No dead code or commented-out blocks in the final submission.
2.3 Baseline Functional Requirements
Every project must, at minimum, provide the following operations:
• A text menu loop that keeps running until the user chooses 'Exit'.
• Create: add a new record (with validation of all fields).
• Read: list all records, and search by at least two different criteria.
• Update: modify an existing record selected by its ID or unique code.
• Delete: remove a record, with a confirmation prompt before deletion.
• Statistics: at least one summary report built with a Dictionary.
• Export: write a report to a text/CSV file on disk.
3-5. The Three Projects (choose ONE)
Projects A, B, and C follow. They share the architecture, baseline features, and rubric above, so
pick the one you find most interesting.
Project A: Library Management System
Background
Build a console application that helps a small library manage its books, its registered members,
and the borrowing / returning of books. The system tracks who borrowed which book and when
it is due, and calculates an overdue fine when a book is returned late.
Functional Requirements
Book Management
• Add a book: ISBN, title, author, category, total copies.
• Update / delete a book.
• Search books by title (partial match) or by category.
• Show available copies (total copies minus copies on loan).
Member Management
• Add a member: member number, name, phone, member type (Student / Teacher).
• Update / delete a member.
• Search members by name or member number.
Borrow & Return
• Borrow a book: pick a member and an available book; record the borrow date and a due date
(e.g. 30 days later).
• Return a book: record the return date.
• Reject borrowing when no copies are available.
• Calculate an overdue fine (e.g. 0.5 yuan per day late) on return.
Statistics & Export
• Count borrowed books grouped by category (use a Dictionary).
• List all currently overdue loans.
• Export the full book list (or the overdue list) to a CSV file.
Database Schema
Use the following SQLite schema (you may add columns if needed):
CREATE TABLE IF NOT EXISTS books (
id INTEGER PRIMARY KEY AUTOINCREMENT,
isbn TEXT UNIQUE NOT NULL,
title TEXT NOT NULL,
author TEXT,
category TEXT,
total_copies INTEGER NOT NULL DEFAULT 1
);
CREATE TABLE IF NOT EXISTS members (
id INTEGER PRIMARY KEY AUTOINCREMENT,
member_no TEXT UNIQUE NOT NULL,
name TEXT NOT NULL,
phone TEXT,
member_type TEXT
);
CREATE TABLE IF NOT EXISTS borrow_records (
id INTEGER PRIMARY KEY AUTOINCREMENT,
book_id INTEGER NOT NULL,
member_id INTEGER NOT NULL,
borrow_date TEXT NOT NULL,
due_date TEXT NOT NULL,
return_date TEXT,
fine REAL DEFAULT 0,
FOREIGN KEY (book_id) REFERENCES books(id),
FOREIGN KEY (member_id) REFERENCES members(id)
);
Project-Specific Implementation Requirements
• A book cannot be borrowed when all copies are already on loan; the available count =
total_copies minus active (not-yet-returned) borrow records.
• Model member types with inheritance or an interface (e.g. an abstract Member base with
Student / Teacher subclasses, which may have different maximum borrow limits).
• The overdue fine must be computed from the difference between the return date and the
due date (use DateTime).
Bonus (optional, for higher marks)
• Different borrow limits and loan periods per member type.
• A 'most popular books' ranking (top 5 by borrow count).
Sample Interaction
===== Library Management System =====
1. Books 2. Members 3. Borrow/Return 4. Statistics 5. Export 0. Exit
Choose: 3
-- Borrow a Book --
Member number: M001
Book ISBN: 9787111128069
Borrowed 'Data Structures' to Zhang San. Due: 2026-07-25.
Choose: 4
-- Borrowed count by category --
Computer Science : 12
Mathematics : 5
Literature : 3
Project B: Personal Finance Tracker
Background
Build a console application that records a person's income and expense transactions, classifies
them by category, and produces monthly statistics. The system warns the user when spending in
a category exceeds a budget they have set.
Functional Requirements
Category Management
• Add a category: name and kind (Income / Expense).
• Update / delete a category.
• List all categories grouped by kind.
Transaction Management
• Add a transaction: date, amount, category, note.
• Update / delete a transaction.
• Search transactions by month or by category.
• Reject a non-positive amount or an unknown category.
Budget Management
• Set a monthly budget amount for an expense category.
• When adding an expense, warn if the month's spending in that category exceeds its budget.
Statistics & Export
• Monthly summary: total income, total expense, and balance.
• Expense breakdown by category for a chosen month (use a Dictionary).
• Export the monthly report to a text or CSV file.
Database Schema
Use the following SQLite schema (you may add columns if needed):
CREATE TABLE IF NOT EXISTS categories (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT UNIQUE NOT NULL,
kind TEXT NOT NULL -- 'Income' or 'Expense'
);
CREATE TABLE IF NOT EXISTS transactions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
tx_date TEXT NOT NULL, -- 'YYYY-MM-DD'
amount REAL NOT NULL,
category_id INTEGER NOT NULL,
note TEXT,
FOREIGN KEY (category_id) REFERENCES categories(id)
);
CREATE TABLE IF NOT EXISTS budgets (
id INTEGER PRIMARY KEY AUTOINCREMENT,
category_id INTEGER NOT NULL,
month TEXT NOT NULL, -- 'YYYY-MM'
amount REAL NOT NULL,
UNIQUE (category_id, month),
FOREIGN KEY (category_id) REFERENCES categories(id)
);
Project-Specific Implementation Requirements
• A transaction's category determines whether it counts as income or expense; the monthly
balance = total income minus total expense.
• Model Income and Expense with inheritance or an interface (e.g. an abstract Transaction
base, or an ITransaction interface).
• Budget checking must aggregate the chosen month's expenses for the category before
comparing against the budget.
Bonus (optional, for higher marks)
• A simple text bar chart of expenses per category (using repeated '#' characters).
• Carry an over-budget warning count into the monthly report.
Sample Interaction
===== Personal Finance Tracker =====
1. Categories 2. Transactions 3. Budgets 4. Statistics 5. Export 0. Exit
Choose: 2
-- Add Transaction --
Date (YYYY-MM-DD): 2026-06-20
Amount: 320
Category: Dining
[Warning] June dining spending 1180.00 exceeds budget 1000.00!
Choose: 4
-- June 2026 Summary --
Income : 8000.00
Expense: 5430.00
Balance: 2570.00
Project C: Warehouse Inventory System
Background
Build a console application that manages products in a warehouse, the suppliers that provide
them, and every stock movement (goods coming in and going out). The system keeps a running
stock quantity per product and warns when a product falls below its minimum stock level.
Functional Requirements
Product Management
• Add a product: SKU, name, unit, unit price, minimum stock level, supplier.
• Update / delete a product.
• Search products by name or by supplier.
• Show the current stock quantity for each product.
Supplier Management
• Add a supplier: code, name, contact phone.
• Update / delete a supplier.
• List all suppliers.
Stock Movements
• Stock-In: increase a product's quantity, recording date and amount.
• Stock-Out: decrease a product's quantity; reject if it would go negative.
• Warn when a stock-out leaves the quantity below the minimum level.
Statistics & Export
• Total inventory value grouped by supplier (use a Dictionary).
• List all products currently below their minimum stock level.
• Export the stock report to a CSV file.
Database Schema
Use the following SQLite schema (you may add columns if needed):
CREATE TABLE IF NOT EXISTS suppliers (
id INTEGER PRIMARY KEY AUTOINCREMENT,
code TEXT UNIQUE NOT NULL,
name TEXT NOT NULL,
phone TEXT
);
CREATE TABLE IF NOT EXISTS products (
id INTEGER PRIMARY KEY AUTOINCREMENT,
sku TEXT UNIQUE NOT NULL,
name TEXT NOT NULL,
unit TEXT,
unit_price REAL NOT NULL DEFAULT 0,
min_stock INTEGER NOT NULL DEFAULT 0,
quantity INTEGER NOT NULL DEFAULT 0,
supplier_id INTEGER,
FOREIGN KEY (supplier_id) REFERENCES suppliers(id)
);
CREATE TABLE IF NOT EXISTS stock_movements (
id INTEGER PRIMARY KEY AUTOINCREMENT,
product_id INTEGER NOT NULL,
move_type TEXT NOT NULL, -- 'IN' or 'OUT'
quantity INTEGER NOT NULL,
move_date TEXT NOT NULL,
FOREIGN KEY (product_id) REFERENCES products(id)
);
Project-Specific Implementation Requirements
• A stock-out must never drive a product's quantity below zero; validate before committing
the movement.
• Model movement types with inheritance or an interface (e.g. an abstract StockMovement
base with StockIn / StockOut subclasses).
• Inventory value for a product = quantity multiplied by unit price; the report sums these
grouped by supplier.
Bonus (optional, for higher marks)
• An automatic low-stock alert list shown on every startup.
• A movement history report for a single product.
Sample Interaction
===== Warehouse Inventory System =====
1. Products 2. Suppliers 3. Stock In/Out 4. Statistics 5. Export 0. Exit
Choose: 3
-- Stock Out --
Product SKU: P-1001
Quantity: 50
Stock-out recorded. 'A4 Paper' remaining: 18.
[Warning] 'A4 Paper' is below its minimum stock level (20)!
Choose: 4
-- Inventory value by supplier --
Office Depot : 12450.00
Tech Supplies : 30880.00
6. Submission Requirements
6.1 What to Submit (Deliverables)
7. Complete source code of the project (the whole solution folder). Delete the bin/ and obj/
build folders before packaging.
8. The SQLite database file ([Link]) containing your sample data, OR a .sql script that
recreates the schema and seed data.
9. A project report (Word or PDF, 3-6 pages) — see the report contents below.
10. A [Link] explaining how to build and run the project (dotnet restore / dotnet run) and
which Project (A/B/C) you chose.
6.2 Project Report Contents
• Cover page: project title, your name, student ID, class, chosen project.
• Requirements analysis: what the system does.
• Database design: the table structures and the E-R relationships.
• Class design: the main classes and how the layers fit together.
• Key code explanation: 2-3 important methods, briefly explained.
• Screenshots of the program running (main features).
• A short reflection: difficulties met and how you solved them.
6.3 Packaging & How to Submit
11. Put the source, database, report, and README into ONE folder.
12. Compress that folder into a single .zip file.
13. Name the zip exactly: StudentID_Name_ProjectX.zip (example:
202412345_ZhangSan_ProjectA.zip).
14. Email the zip as an attachment to wp@[Link].
15. Use this email subject: CSharp Project - StudentID - Name (example: CSharp Project -
202412345 - ZhangSan).
16. Deadline: July 10, 2026 (2026-07-10), 23:59. Emails received after the deadline lose marks.
6.4 Academic Integrity
• Work individually. Copied or shared projects receive zero for all students involved.
• You may use AI assistance, but you must understand and be able to defend every part of
your code.
• Code that does not compile cannot earn functionality marks — test before you submit.
7. Grading Rubric (100 points)
The project is graded out of 100 points across the five dimensions below. The weighting follows
the final-exam (comprehensive project) criteria in the course overview.
Dimension Points What earns the marks
Functionality 35 All required features (CRUD,
search, statistics, export)
work correctly; the menu
loop is robust; edge cases are
handled.
Code Standards & OOP 25 Layered architecture
(Models/Data/Services/UI);
correct use of inheritance or
an interface; naming
conventions; parameterized
SQL; clean, readable code.
Database Design 15 Sensible tables,
primary/foreign keys,
constraints; full CRUD against
SQLite works as designed.
Project Report 10 Complete, well-structured
report with database design,
class design, and running
screenshots.
Defense / Q&A 15 Able to explain the design,
walk through the code, and
make a small live change on
request.
Total 100