33 lines
681 B
Java
33 lines
681 B
Java
/**
|
|
* Represents a song in the Spotify playlist.
|
|
* Stores the artist, title and duration of a song.
|
|
* Provides methods to access the song information.
|
|
*/
|
|
|
|
public class Song {
|
|
private String künstler;
|
|
private String titel;
|
|
private int dauer;
|
|
|
|
//create a new song
|
|
public Song(String künstler, String titel, int dauer) {
|
|
this.künstler = künstler;
|
|
this.titel = titel;
|
|
this.dauer = dauer;
|
|
}
|
|
//return the artist
|
|
public String getKünstler() {
|
|
return künstler;
|
|
}
|
|
//return the title
|
|
public String getTitel() {
|
|
return titel;
|
|
}
|
|
//return the duration
|
|
public int getDauer() {
|
|
return dauer;
|
|
|
|
}
|
|
|
|
}
|