import java.util.Scanner;
public class lab2_lab2 {
	
	public static int songTimes;
	private Scanner scan = new Scanner(System.in);
	private static String song = new String();
	private static String repeat = new String();
	private String y;
	private String n;

	public lab2_lab2(){
		songTimes = 0;
		song = "";
		repeat = new String();
		y = new String();
		n = new String();
	}
	public void songPlayer() {
		
		System.out.println("Song Player");
		System.out.println("Written by : Whiskey Guy" );
		System.out.println("   " );

		System.out.print("Enter the name of your favorite song: ");
		song = scan.nextLine();
	}
		
	public void inputSongPreference() {
		
		System.out.print("Do you wan't to listen to it in repeat mode (y/n): ");
		repeat = scan.nextLine();
		if (repeat.contains("y")) {
			System.out.print("Enter the number of times you want to repeat the song (1 or more):");
			songTimes = scan.nextInt();

			for(int count = 1; count <= songTimes; count++)
				System.out.println("Playing " + song);
		}
		
		
		
		else {
			System.out.println("Playing " + song);
	
	}
	

}
}	

________________________________________________________________________________________________________________________________________________________________________

import java.util.Scanner;

public class inl2 {
	
	public static void main(String[] args) {
		
		lab2_lab2 MyLab = new lab2_lab2();
		MyLab.songPlayer();
		MyLab.inputSongPreference();
		
		
		
		
		
	}
}	