PPT Slide
Using Objects: Creating a Box
public static void main (String[ ] argv) {
(“The combined volume of the boxes”);
(“is: “, iTotalVolumeOfBoxes);
} // of class BoxesExampleProgram
1. Variable declaration and assignment
is mixed together. A more complex
program might require better organization
2. “Hybrid OO”: We have classes, but
everything occurs within a static method,
“main”, making things linear. This is fine
for small programs, but larger programs
would benefit from “Pure OO”. Keep this
in mind; it becomes very important later.