Dale - Computer Science Illuminated 290

Dale - Computer Science Illuminated 290 - objects. The...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
8.4 Functionality of Object-Oriented Languages 263 class of object to which the method is applied determines which S0 91d ; 02. . method is used. For example, if we had j792 as an instance of class M20.D9 and j7PU as an instance of class u1– 291 , j792hS0 91; 02. .gB would invoke the method defined in class M20.D9 and j7PUhS0 91; 02. .gB would print the address defined in class u1– 291 . Inheritance and polymorphism combined allow the programmer to build useful hierarchies of classes that can be reused in different applications. You can think of the problem-solving phase as mapping the objects in the real world into classes, which are descriptions of the categories of
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: objects. The implementation phase takes the descriptions of the cate-gories (classes) and creates instances of the classes that simulate the objects in the problem. The interactions of the objects in the program simulate the interaction of the objects in the real world of the problem. See Figure 8.9. Figure 8.9 Mapping of problem into solution (b) Implementation phase Abstract to classes (descriptions of objects) Oval Circle Square Class type definitions (a) Problem-solving phase Problem space of objects Program space of objects...
View Full Document

Ask a homework question - tutors are online