Objects, References, Messages and the Programming Process

 

How can we reference a specific object?

We can name the objects, as an example think of the class "dog". You can have several elements of the class dog. Dogs come in different shapes, sizes and colors so each an every object that belongs to the class dog will be an instance. An instance of the dog class will inherit the same two eyes

You can reference an instance of dog by its name. Fido will be a very typical instance of this class, Snoopy will be another.

What is a message?

A message is something that you tell an object to do. As an example you can as Fido to sit. Sitting will be the behavior of the object. To send a message you need:

The same applies to Java messages.

 

Variable.

a place where you can store information. There are two things that you will need to know about this storage place:

  1. What is the name of this storage place (variable name)
  2. What kind of information can you store in this place (type)
  3. Only one thing can be stored in the variable (storage place) at a given time.

    Method.

    It is a function, an action performed.

    Arguments.

    This are the details that a method needs to perform a function. Details are not always needed. If you create an object dog, by default, it will have two eyes, four legs, one tail, etc., meaning the dog characteristics by definition. If you want an all-black German shepherd with blue eyes, then you will need to add more details and here is where you will need arguments.

     

    The software process

  4. Design
  5. Code
  6. Compile
  7. Test
  8. Implement