go to previous page   go to home page   go to next page

Answer:

Of course. To get the work done, humans (and objects) need to ask each other to do their specialized tasks and need to give each other information necessary for the jobs.


Communicating Objects

boss and workers

A running program is a collection of objects that are each doing their own task and communicating with other objects. The picture shows a running program (or a pizza shop). The jagged lines represent communication. The boss is special and so is drawn with dotted lines.

In Java programs the main() method is special because it is where the Java interpreter starts the whole program running. The main() method is a static method, which means that there will be only one instance of it and that it exists (as part of a class) before any objects have been created.


QUESTION 4:

Say that after a few days your object-oriented pizza business gets more orders than it can handle. What will you do?


go to previous page   go to home page   go to next page