class Song extends Object120 { String title; String artist; double length; // running time, in s. boolean isCopyrighted; // the "constructor": Song( String t, String a, double l, boolean isC ) { super(t,a,l,isC); // <-- `super` is voodoo, for now } /** return whether `s` can be stored using `space` disk-space. * @param s the song to consider * @param space the amount of available space it has to fit into, in B. */ static boolean willFit( Song s, int space ) { return (s.length/60)*3.0*Math.pow(2,20) <= space; } /** return whether one song is shorter than another. * @return whether s1 is shorter than s2. */ static boolean isShorter( Song s1, Song s2 ) { return (s1.length < s2.length); } static void testAll() { // some examples of Song objects: Song s1 = new Song("Old Town Road", "Little Nas X", 120, true); Song s2 = new Song("Ring Ring", "Abba", 180, true); Song s2a = new Song("Ring Ring", "Abba", 180, true); } }