-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMusicAlbum.java
More file actions
46 lines (38 loc) · 1.26 KB
/
MusicAlbum.java
File metadata and controls
46 lines (38 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package MediaCatalogue;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
/**
*
* @author ammar
*/
public class MusicAlbum extends MediaItem{
private StringProperty artist;
private StringProperty numTracks;
MusicAlbum(){
}
MusicAlbum(String title, String genre, String year, String rating, String artist, String numTracks){
super(title,rating,genre,year);
this.artist = new SimpleStringProperty(artist);
this.numTracks = new SimpleStringProperty(numTracks);
}
public String getArtist() {
return artist.get();
}
public String getNumTracks() {
return numTracks.get();
}
public void setArtist(String artist) {
this.artist.set(artist);
}
public void setNumTracks(String numTracks) {
this.numTracks.set(numTracks);
}
public String toCSVString() {
return getTitle() + "," + getRating() + "," + getGenre() + "," + getYear() + "," + getArtist() + "," + getNumTracks();
}
}