-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVinylTrack.java
More file actions
33 lines (24 loc) · 776 Bytes
/
VinylTrack.java
File metadata and controls
33 lines (24 loc) · 776 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
33
// VinylTrack.java
public class VinylTrack extends MusicTrack{
private String formatType = "Vinyl";
private String diskRPM;
// Constructors
public VinylTrack(){ /* do nothing */ };
public VinylTrack(String title, String length, String artist,
String album, int year, String diskRPM){
super(title, length, artist, album, year);
this.diskRPM = diskRPM;
}
// Setters
public void setRPM(String diskRPM){ this.diskRPM = diskRPM; }
// Getters
public String getAdditionalInfo(){ return (formatType+" "+diskRPM); }
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("V " + diskRPM);
}
}