[an error occurred while processing this directive]
Recitation 9 Exercises (7-8 November 2012)
Question 1 Come up with an idea for an object that has three
attributes (adjectives), and three actions (verbs). You can write
this as a Java class, or just an English description (that you will
convert to Java during recitation). For example, an elephant has a
weight, trunk length, and playfulness. It can honk, spray water, and
stampede. Ultimately, the attributes will become instance variables,
and the actions will become methods in your Java class.
Question 2 Come up with a second object that uses your first
one. This should also have three attributes/parts and three actions.
For example, a circus uses elephants. So one of the instance
variables in a circus class might be an array of elephants.