-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMusik.java
More file actions
65 lines (52 loc) · 1.51 KB
/
Musik.java
File metadata and controls
65 lines (52 loc) · 1.51 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
public class Musik{
private String judul, genre, tahun, artist, pencipta;
public String jenisLagu, filePath;
public Musik(){}
public Musik(String judul, String genre, String tahun, String artist, String pencipta) {
this.judul = judul;
this.genre = genre;
this.tahun = tahun;
this.artist = artist;
this.pencipta = pencipta;
this.jenisLagu = (Integer.parseInt(tahun) < 2020)? "Old School" : "New School";
}
public String getJudul() {
return this.judul;
}
public void setJudul(String judul) {
this.judul = judul;
}
public String getGenre() {
return this.genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
public String getTahun() {
return this.tahun;
}
public void setTahun(String tahun) {
this.tahun = tahun;
}
public String getArtist() {
return this.artist;
}
public void setArtist(String artist) {
this.artist = artist;
}
public String getPencipta() {
return this.pencipta;
}
public void setPencipta(String pencipta) {
this.pencipta = pencipta;
}
public String toString(){
return
"Jenis Lagu : " + this.jenisLagu + "\n" +
"Judul : " + this.judul + " \n" +
"Genre : " + this.genre + " \n" +
"Tahun : " + this.tahun + " \n" +
"Artist : " + this.artist + " \n" +
"Pencipta : " + this.pencipta;
}
}