All projects
Personal2024

University Library System

Java MVC console app with inheritance hierarchies, polymorphic loan rules, and custom CSV persistence.

JavaOOPJUnitFile I/O

Distinction Grade (80%)

Achieved a First-Class mark for software architecture quality, clean code practices, and comprehensive documentation.

University Library System

Challenge

Modelling complex entity relationships and enforcing role-specific business rules with file-based persistence and no database.

Approach

Developed a Java MVC console app using inheritance hierarchies, polymorphic loan rules, and a custom CSV persistence engine.

What it does

MVC + OOP Architecture

Model-View-Controller with abstract base classes and composition patterns.

CSV Persistence Engine

Custom DataLoader serializes complex object graphs, decoupling logic from storage.

Role-Based Loan Rules

Polymorphic constraints enforce per-role limits (10 Adult, 3 Child) and suspension states.

JUnit + Functional Tests

White-box unit tests for core logic combined with end-to-end workflow testing.

Class Hierarchy

Base ClassSubclassesKey Responsibilities
Product (Abstract)Book, CD, DVD, AudiobookStores metadata (ISBN, Title), manages loan status
User (Abstract)Student, ChildUser, AdultUserManages personal info, active loans, and permissions
LoanN/ALinks Users to Products, tracks due dates and fines

Testing Verification

Test TypeScopeKey Scenarios Verified
FunctionalEnd-to-End User FlowsLogin, Product Visibility (DVDs hidden for Students), Error Handling
Unit (JUnit)Core Business LogicBorrowing Limits (10/5/3), Guardian Assignment, ID Uniqueness
RegressionBug Fix VerificationLoan state consistency between Controller and User classes