forked from AUT-AP-2020/workshop-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMusic.java
41 lines (33 loc) · 906 Bytes
/
Music.java
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
public class Music{
private String file;
private String singerName;
private int year=0;
private boolean isFav=false;
public Music(String file, String singerName, int year){
this.file=file;
this.singerName=singerName;
this.year=year;
}
public int getYear(){
return year;
}
public String getFileAddress(){
return file;
}
public String getSingerName(){
return singerName;
}
public boolean getIsFav(){
return isFav;
}
public void setFav(boolean isFav) {
this.isFav = isFav;
return;
}
public void printinfo(){
System.out.println("file addres is: "+ this.file);
System.out.println("singer name is: "+ this.singerName);
System.out.println("year of production is: "+ this.year);
return;
}
}