object that you initialize in the constructor using the constructor’s
argument. Add a
method and a method
that appends a
object to your internal string. Implement
methods that each take a
handle as an argument and call
but in the second method call
first. Test the two methods and show the different effects.
a class called
that is a battery number (as a unique identifier). Make it cloneable and give
method. Now create a class called
that contains an array of
that prints out all the batteries. Write a
that automatically clones all of its
objects. Test this by cloning
and printing the result.
so that all of the
methods catch the
rather than passing it to the caller.
to add more member objects to classes
and see if you can determine how the timings vary with complexity –
whether it’s a simple linear relationship or if it seems more complicated.
create a deep-copy version of the snake.