SortedCDCollection

SortedCDCollection - /* / SortedCDCollection.java Author:...

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

View Full Document Right Arrow Icon
//******************************************************************** // SortedCDCollection.java Author: Lewis and Loftus // // Solution to Programming Project 6.12 //******************************************************************** import java.text.NumberFormat; public class SortedCDCollection { private SortableCD[] collection; private int count; private double totalValue; private int currentSize; //----------------------------------------------------------------- // Creates an initially empty collection. //----------------------------------------------------------------- public SortedCDCollection () { currentSize = 100; collection = new SortableCD[currentSize]; count = 0; totalValue = 0.0; } //----------------------------------------------------------------- // Adds a CD to the collection, increasing the size of the // collection if necessary. //----------------------------------------------------------------- public void addCD (String title, String artist, double value, int tracks)
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

SortedCDCollection - /* / SortedCDCollection.java Author:...

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