This is a WPF-based application developed using .NET 9.0. It allows users to manage a movie library with features like adding, sorting, borrowing, and returning movies.
- Add new movies to a library
- Search by title or ID
- Sort by title (Bubble Sort)
- Sort by year (Merge Sort)
- Borrow/Return movies
- xUnit tests with 100% coverage
- .NET 9.0 SDK (WPF)
- xUnit for unit testing
- C# with LinkedList, Dictionary, Queue data structures
git clone Movie-Application-APA1
cd Movie-Application-APA1
dotnet restore
dotnet build
dotnet run
dotnet test
APA1.csproj
: Main WPF applicationMOVIE_APPLICATION_APA1.Tests.csproj
: xUnit test projectMovieLibrary.cs
: Backend logicMainWindow.xaml
: Frontend UIREADME.md
,TestPlan.md
: Documentation
When you launch the application (dotnet run
from the APA1 project), the following features are available in the WPF window:
- Search by Title: Type part of a movie title in the first textbox and click "Search Title" to see all matches.
- Search by ID: Enter a movie ID (e.g., M001) in the second textbox and click "Search ID" to find a specific movie.
- Click "Add Movie" to insert a new movie with default details.
- New movies get auto-generated IDs like M001, M002, etc.
- Use "Sort by Title" to alphabetically order the movie list.
- Use "Sort by Year" to arrange movies by their release year.
- Select a movie row from the list.
- Click "Borrow Movie" to mark it as unavailable.
- Click "Return Movie" to make it available again.
MovieLibrary.cs
manages the data using:LinkedList<Movie>
for storing moviesDictionary<string, Movie>
for fast ID lookupQueue<string>
to simulate a borrow waitlist
- Sorting is done manually with:
- Bubble Sort (Title)
- Merge Sort (Year)
- UI is written in
MainWindow.xaml
using WPF components likeDataGrid
,TextBox
, andButton
.