SortableCD - /* / SortableCD.java Author: Lewis and Loftus...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // SortableCD.java Author: Lewis and Loftus // // Solution to Programming Project 6.12 //******************************************************************** import java.text.NumberFormat; public class SortableCD implements Comparable { private String title, artist; private double value; private int tracks; //----------------------------------------------------------------- // Creates a new SortableCD with the specified information. //----------------------------------------------------------------- public SortableCD (String theTitle, String theArtist, double theValue, int theTracks) { title = theTitle; artist = theArtist; value = theValue; tracks = theTracks; } //----------------------------------------------------------------- // Returns a description of this SortableCD. //----------------------------------------------------------------- public String toString() { NumberFormat fmt = NumberFormat.getCurrencyInstance();
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Page1 / 2

SortableCD - /* / SortableCD.java Author: Lewis and Loftus...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online