Class Song3
- java.lang.Object
-
- Song3
-
class Song3 extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static doubleMB_PER_SEC
-
Constructor Summary
Constructors Constructor Description Song3(java.lang.String a, java.lang.String t, double l, boolean isC)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.StringgetArtist()doublegetDiskSpace()booleangetIsCopyrighted()doublegetLength()(package private) java.lang.StringgetTitle()booleanisShorter(Song3 that)return whether one song is shorter than another.static voidmain(java.lang.String[] args)(package private) Song3remix(java.lang.String dj, double newMaterialLength)return a remix of a song.voidsetIsCopyrighted(boolean newIsCopyrighted)(package private) static voidtestAll()java.lang.StringtoString()booleanwillFit(int space)return whether `s` can be stored using `space` disk-space.
-
-
-
Field Detail
-
MB_PER_SEC
public static final double MB_PER_SEC
- See Also:
- Constant Field Values
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
willFit
public boolean willFit(int space)
return whether `s` can be stored using `space` disk-space.- Parameters:
s- the song to considerspace- the amount of available space it has to fit into, in B.
-
getDiskSpace
public double getDiskSpace()
- Returns:
- how much space this song takes on disk, as an mp3, in B.
-
isShorter
public boolean isShorter(Song3 that)
return whether one song is shorter than another.- Returns:
- whether s1 is shorter than s2.
-
getArtist
java.lang.String getArtist()
-
getTitle
java.lang.String getTitle()
-
getLength
public double getLength()
- Returns:
- the length of this song, in seconds.
-
getIsCopyrighted
public boolean getIsCopyrighted()
-
setIsCopyrighted
public void setIsCopyrighted(boolean newIsCopyrighted)
-
remix
Song3 remix(java.lang.String dj, double newMaterialLength)
return a remix of a song.- Returns:
- `orig` remixed by D.J. `dj`, who added `newMaterialLength` seconds of ill beatz.
-
testAll
static void testAll()
-
main
public static void main(java.lang.String[] args)
-
-