void clear()
{
count = 0;
}
void pop()
{
count--;
}
discussion of next hw; due wed night
hw 1.2
instead of a max capacity of 100, it
will start at 100. if hits it, double it.
this, every time it hits the current capacity
Shape arr[] = new Shape[30];
i = 0;
arr[i] = new Rectangle(10, 10, 45, 56, "blue");
i++;
arr[i] = new Circle(40, 45, 56, "red");
i++;
for (int j = 0; j < i; j++)
arr[j].draw();
Stack<Shape> s = new Stack<Shape>();
s.push(new Rectangle(10, 10, 45, 56, "blue"));
exceptions
No comments:
Post a Comment