private String songTitle; private String albumName; private String artistName; private int releaseYear;
// Constructor public Music(String title, String album, String artist, int year) { } // Get methods public String getTitle() { } public String getAlbum() { } public String getArtist() { } public int getYear() { }
// toString method public String toString() {}
public double getPrice() { }The algorithm for determining the price is $1.29 for titles released before 1970, $1.89 for titles released in the 1970's, $0.69 for titles released in the 1980's, $0.99 for titles released in the 1990's, and $1.39 for titles released on 2000 and later. The reasoning for this is that some decades have better music than others!
public static void readLibrary(String inputFile);
public static void writeLibrary(String outputFile);
1: Brown Eyed Girl, Blowin' Your Mind!, Van Morrison, 1967 2: Stop Putting the Hurt on Me, Lucille, B. B. King, 1968 3: Another Brick in the Wall, The Wall, Pink Floyd, 1979 4: Funeral for a Friend, Goodbye Yellow Brick Road, Elton John, 1973 5: Beat It, Thriller, Michael Jackson, 1982 6: Like a Virgin, Like a Virgin, Madonna, 1984 7: So Far Away, Brothers in Arms, Dire Straits, 1985 8: Try a Little Tenderness, Swamp Boogie Queen, Katie Webster, 1990 9: Hey Jack Kerouac, MTV Unplugged, 10,000 Maniacs, 1993 10: Mockingbird, Encore, Eminem, 2005 11: Jackdaw, Draw the Line, David Gray, 2009 12: Someone Like You, 21, Adele, 2011 Total cost: $14.58