A good answer might be:

Is the Car class made up of smaller software objects?

What are the instance variables of class Car?

What is the method of class Car?

Holding the State of an Object

Objects have (i) identity, (ii) state, and (iii) behavior. The idea of "state" is that an object has characteristics that it keeps as long as it exists. The characteristics may change in value during the lifetime of the object.

The state of an object is held it its instance variables (not in the parameters of methods, nor in the local variables of methods.) The instance variables of a class are not declared as part of any method. Here is a main() program that constructs a Car object.

class mpgTester
{
  public static void main ( String[] args )
  {
    Car myCar = new Car( 12000, 12340, 12.3 );

    . . . . . . 
  }
}

The state of the object is set to:

The object referenced by myCar holds these values as long as it exists.


QUESTION 3:

Could a collection of several cars be regarded as an object?