To-Do List Application
Manage a list that changes: add, complete, remove and display items. Your first program with real state.
Technologies
The brief
What the finished thing needs to do.
- Add a task with a description
- List all tasks with a number and whether each is complete
- Mark a task complete by its number
- Remove a task by its number
- Handle a number that does not correspond to any task
- Show a sensible message when the list is empty
How to structure it
Model a task as a class with a description and a completion flag, rather than keeping two parallel lists. This is the lesson the project exists to teach.
Hold the tasks in a List<Task>. Separate the menu handling from the operations on the list.
Note the difference between the number shown to the user, which starts at 1, and the list position, which starts at 0. Converting between them in one place avoids scattered off-by-one mistakes.
Why these technologies
- A class for the task
- Keeps the description and completion state together so they cannot drift apart.
- List<T>
- The number of tasks changes as the program runs, which an array cannot accommodate.
Build it in this order
Each stage produces something that works. That matters — a project that only runs at the very end is a project people abandon.
Display a fixed list
Create three tasks in code and print them numbered from 1.
Add tasks from input
A loop with a menu: add a task, or quit.
Mark tasks complete
Read a number, convert it to a position, and update the task.
Handle invalid numbers
Reject anything outside the valid range with a clear message, before using it as an index.
Remove tasks
Consider what happens to the numbering of the remaining items.
Handle the empty list
Every operation should behave sensibly when there is nothing there.
Tidy up
Extract each menu action into its own method.
Done means
How to know it is finished
Check each of these before moving on. If one fails, the project is not done yet — and that is useful information rather than a setback.
- All four operations work and the display always reflects the current state
- Entering an out-of-range or non-numeric task number is handled gracefully
- An empty list produces a message rather than blank output or an error
- Task description and completion state live in one class, not parallel collections
If you want to go further
Extensions worth attempting
Only once the core build meets every criterion above.
- Save tasks to a file so they survive restarting the program
- Add a due date and highlight overdue tasks
- Support priorities and sort by them
- Add a filter to show only incomplete tasks
Other projects at this level
Console Calculator
Your first program that does something useful. Reads input, validates it, calculates, and handles the cases that go wrong.
Expense Tracker
A web interface that records expenses and summarises them. Your first project with real UI state and accessibility requirements.
Contact Manager
A mobile-shaped application for storing contacts, with search and offline-tolerant local storage.
Have a project worth talking through?
Tell us what you're building or what's slowing your current system down. We'll give you a direct read on scope and approach.