📦 This repository is archived.
It is kept as a personal learning and experimentation project and is no longer actively developed.
This repository contains an educational, terminal-based music player built as part of a Data Structures course.
It is designed as a learning and demonstration project and is not intended for production use.
Modern music players abstract away nearly all internal logic behind rich graphical interfaces and high-level APIs. While convenient, this abstraction often prevents students from understanding how such systems work internally—especially how data structures and algorithms power everyday applications.
Listly was created to bridge that gap.
This project implements a fully functional playlist manager using core Java only, without external libraries or frameworks. By building everything from scratch and running it in a terminal-based interface, the focus remains firmly on logic, structure, and program design rather than UI complexity.
Music playlists are an ideal learning model for DSA:
- Song traversal maps naturally to linked list traversal
- Next/previous navigation mirrors pointer movement
- Insertions and deletions demonstrate real-time data manipulation
By implementing these manually, students gain a deeper understanding of memory flow, object relationships, and modular software design.
- Build a functional Java-based music player using custom data structures
- Reinforce object-oriented programming principles
- Demonstrate persistent data storage using file I/O
- Support common playlist operations:
- Play / pause
- Next / previous
- Looping
- Seeking specific songs
- Strengthen the connection between DSA theory and real-world use cases
- Encourages application-centric learning of Data Structures
- Avoids reliance on external libraries, ensuring clarity of core logic
- Demonstrates interaction between Java classes, objects, and constructors
- Uses a CLI interface enhanced with ANSI color codes for clarity and aesthetics
- Serves as a strong foundational model for more complex systems (media servers, GUI players, etc.)
- Encapsulation
- Private fields with public getters/setters
- File I/O
- Reading and writing playlist data to disk
- Exception Handling
- Try-catch blocks for safe user interaction
- Static Methods & Variables
- Shared configuration and utility behavior
- Switch Statements
- Menu-driven command-line interface
- Doubly Linked List
- Core structure behind playlist traversal
- Custom Node Class
- Stores song data and navigation pointers
- Traversal
- Sequential access from head to tail
- Insertion / Deletion / Search
- Implemented with clear and readable logic
Most commercial media players hide their internal architecture, making it difficult for learners to relate theoretical DSA concepts to real applications. As a result, students often understand linked lists only in isolation, without appreciating their real-world utility.
This project addresses that problem by:
- Exposing every operation explicitly
- Avoiding abstraction-heavy tools
- Tying each feature directly to a DSA concept
- User-generated input
- Songs are added during runtime
- Playlist data is persisted in
playlist.dat
Each song entry includes:
- File path to the audio file
No external datasets or APIs are used, keeping the system simple and self-contained.
- UI Layer
Listly.java- Handles user interaction and menu display
- Uses ANSI colors via
Colors.java
- Control Layer
- Processes commands and routes actions
- Data Layer
LinkedList.java,Song.java- Custom doubly linked list implementation
- Persistence Layer
- File-based storage for playlist continuity
| Class | Purpose | Concepts Used |
|---|---|---|
Song |
Stores song metadata | Classes, encapsulation |
Node |
Wraps song and pointers | Linked list logic |
LinkedList |
Playlist structure & operations | DSA, traversal |
Playlist |
Interface between user input and data | Switch-case, control flow |
Listly |
Main entry point | main(), modular design |
Colors |
ANSI color utilities | Static utilities |
| Operation | Description | Time Complexity |
|---|---|---|
| Insertion | Add song at end | O(1) |
| Deletion | Remove by title/index | O(n) |
| Traversal | Display full playlist | O(n) |
Listly/
│
├── Listly.java
├── Playlist.java
├── LinkedList.java
├── Song.java
├── Colors.java
├── login.java
│
├── playlist.dat
│
├── *.wav # Sample audio files
├── *.class # Compiled bytecode
📦 This repository is archived.
It is kept as a personal learning and experimentation project and is no longer actively developed.