0% found this document useful (0 votes)
11 views14 pages

Java Music Playlist Manager App

The MusicPlaylistManager is a Java-based console application designed for managing music playlists, featuring user authentication and playlist management. Key functionalities include user registration, secure login, playlist creation, song management, and search capabilities, along with error handling for duplicate songs. The application employs an object-oriented approach with classes for songs and podcasts, utilizing interfaces for playability and search functionality.

Uploaded by

damnbeb9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views14 pages

Java Music Playlist Manager App

The MusicPlaylistManager is a Java-based console application designed for managing music playlists, featuring user authentication and playlist management. Key functionalities include user registration, secure login, playlist creation, song management, and search capabilities, along with error handling for duplicate songs. The application employs an object-oriented approach with classes for songs and podcasts, utilizing interfaces for playability and search functionality.

Uploaded by

damnbeb9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

MusicPlaylistManager

MUSICPLAYLISTMANAGER PROJECT
Project overview

A Java-based console application for managing music playlists with user


authentication and playlist management capabilities.
Project features
User management
· User registration with full name, email, and password
· Secure login/logout functionality
· Email-based authentication system
Features

Media Types
Song Class: Implements Playable interface with title, artist,
duration, genre
Podcast Class: Extends MediaItem with title, host, duration
·Abstract MediaItem: Common properties for all media types
Features

Playlist management
Create multiple playlists per user
Add/remove songs with duplicate prevention
Search songs by title or artist
Auto-sort songs alphabetically by title
 Display all playlists and their contents
Features

User interface
Login/Signup screens
Main menu with 7 core functions
Error handling and user feedback
DuplicateSongExeption

This class inherits all the behavior of the java built in class runtimeExeption
Class:

Class DuplicateSongException extends RuntimeException {

public DuplicateSongException(String message) {

super(message);

}
DuplicateSongExeption

public void addSong(Song song) {


if ([Link](song)) {

throw new DuplicateSongException(“Song already exists: “ +


[Link]());
}
[Link](song);
}
Interface

Interface playable
Void play();
interface Searchable {
List<Song> search(String query)

 Those the above interface methods implemented in all class


 Play Interface:
 Defines common behavior for anything that can be played/paused in our music
app.
Abstract classe mediaItem

Code Reuse: All media types (Song, Podcast) share title, creator, duration
fields
· Polymorphism: Can store different media in List<MediaItem> and treat
them the same way
 · Enforcement: Forces all media to have getDetails() method
Class song

Inheritance: Gets free fields from MediaItem + adds genre


· Interfaces: Must have play(), pause(), can be compared for sorting
 · Complete Object: Has all needed functionality
 Song song = new Song(“Title”, “Artist”, 3.5, “Pop”);
 [Link](); // From Playable interface
 [Link](); // From MediaItem
 [Link](song); // Works because of equals/hashCode
Playlist

Organization – Groups songs into named collections


2. Duplicate Prevention – Uses HashSet + equals/hashCode
3. Search Function – Finds songs by title/artist
4. Auto-Sorting – Uses TreeSet + compareTo
5. Clean Display – Formatted output
 6. Error Handling - DuplicateSongException
User class

User class for Personal account for playlists.

WITH User class:

· Each person has their own playlists


 ·
MUSICPLAYLISTMANAGER CLASS

MusicPlaylistManager is the Main controller/running app.

WITH this class:

· Complete working music app


· Menu system 1-7 options
· User login/signup
 · All features connected together
END

You might also like