Software Objects

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page        

Answer:

  • Is the tube of tennis balls an object?
    • Yes. It has identity (my tube of balls is different than yours), it has state (opened, unopened, brand name, location), and behavior (although not much).
  • Is each tennis ball an object?
    • Yes. It is OK for objects to be part of other objects. Although each ball has nearly the same state and behavior as the others, each has its own identity.
  • Could the top two balls be considered a single object?
    • Not ordinarily. Each has its own identity independent of the other. If they were joined together with a stick you might consider them as one object.
  • Is the color of the balls an object?
    • No. It is a property of each ball.
  • Is your understanding of tennis balls an object?
    • Probably not, although it is unclear what it is. Perhaps it is a property of the object called "your brain."

Software Objects

Many programs are written to do things that are concerned with the real world. It is convenient to have "software objects" that are similar to "real world objects". This makes the program and what it does easier to think about. Software objects have identity, state, and behavior just as do real world objects. Of course, software objects exist entirely within a computer system and don't directly interact with real world objects.

QUESTION 4:

What are software objects made out of?