-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDigitalTrack.java
More file actions
32 lines (24 loc) · 788 Bytes
/
DigitalTrack.java
File metadata and controls
32 lines (24 loc) · 788 Bytes
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
// DigitalTrack.java
public class DigitalTrack extends MusicTrack{
private String formatType = "Digital";
private String bitRate;
// Constructors
public DigitalTrack(){ /* do nothing */ };
public DigitalTrack(String title, String length, String artist,
String album, int year, String bitRate){
super(title, length, artist, album, year);
this.bitRate = bitRate;
}
// Setters
public void setBitRate(String bitRate){ this.bitRate = bitRate; }
// Getters
public String getAdditionalInfo(){ return (formatType+" "+bitRate); }
public void printTrack(){
System.out.print(title + " ");
System.out.print(length + " ");
System.out.print(artist + " ");
System.out.print(album + " ");
System.out.print(year + " ");
System.out.println("D " + bitRate);
}
}