daily pastebin goal
70%
SHARE
TWEET

Untitled

a guest Oct 11th, 2018 69 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. package JavaOOP.MusicApp;
  2.  
  3. public class MusicRunner {
  4.     public static void main(String[] args) {
  5.         byte[] content = {10, 20, 30};
  6.         SongContent songContent = new SongContent(content);
  7.  
  8.         User mariia = new User("Maria");
  9.         Playlist mix = mariia.createPlaylist("Mix");
  10.         Playlist pop = mariia.createPlaylist("Pop");
  11.  
  12.         Song song1 = new Song(" Original Mix", "Sharliz x FULLER", "mix", 3, songContent);
  13.         Song song2 = new Song("Angetenar", "Rompasso", "mix", 6, songContent);
  14.         Song song3 = new Song("Босая", "#2Маши", "pop", 5, songContent);
  15.  
  16.         mariia.addSongToPlaylist("Mix", song1);
  17.         mariia.addSongToPlaylist("Pop", song2);
  18.         mariia.addSongToPlaylist("Pop", song3);
  19.  
  20.         System.out.println(mariia.toString());
  21.         System.out.println();
  22.  
  23.         System.out.println(mariia.findByTitle("Pop"));
  24.         System.out.println();
  25.  
  26.         System.out.println(pop.findByTitlePart("gete"));
  27.         System.out.println();
  28.  
  29.         System.out.println(mix.getSongs());
  30.         System.out.println();
  31.  
  32.         System.out.println(pop.findByAuthor("Rompasso"));
  33.         System.out.println();
  34.  
  35.         System.out.println(" Amount of songs mix list: " + mix.getTotalLength() + " Amount of songs in pop list: " + pop.getTotalLength());
  36.  
  37.  
  38.     }
  39. }
  40.  
  41. //User{name='Maria', playlists=[Playlist{title='Mix', songs=[Song{title=' Original Mix', author='Sharliz x FULLER', genre='mix', length=3}]}, Playlist{title='Pop', songs=[Song{title='Angetenar', author='Rompasso', genre='mix', length=6}, Song{title='Босая', author='#2Маши', genre='pop', length=5}]}]}
  42. //
  43. //Playlist{title='Pop', songs=[Song{title='Angetenar', author='Rompasso', genre='mix', length=6}, Song{title='Босая', author='#2Маши', genre='pop', length=5}]}
  44. //
  45. //[Song{title='Angetenar', author='Rompasso', genre='mix', length=6}]
  46. //
  47. //[Song{title=' Original Mix', author='Sharliz x FULLER', genre='mix', length=3}]
  48. //
  49. //[Song{title='Angetenar', author='Rompasso', genre='mix', length=6}]
  50. //
  51. // Amount of songs mix list: 1 Amount of songs in pop list: 2
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top