Hi all,
I would like to know what to add to the following code to count the number of objects that have been created.
class CDDriver
{
public static void main(String args[])
{
CD cd1 = new CD("Kaiser "," up the khazi ",(double) 9.99);
CD cd2 = new CD("Oasis "," morning glory ",(double) 3.99);
CD cd3 = new CD("Bob Dylan "," Alreet Sunna ",(double) 6.99);
System.out.println("Artist \t\tTitle\t\tCost");
System.out.println("====================================");
System.out.println(cd1.toString());
System.out.println(cd2.toString());
System.out.println(cd3.toString());
}
}