Accessing an Object and its Data - Delphi OOP Part 4 / Chapter 10
Homework Problems
Problem 4.1 Study Part 4
Identify the appropriate example(s) or section(s) of the chapter to illustrate each comment made in the summary of part 4.
Problem 4.2 Differences between RAD and programmer code
Several operations are needed in order to use an object: the class must be defined, the object reference must be created, and an object must be instantiated and assigned to the reference.
The object is now ready for use. Once the program has no further need for the object, it should be destroyed. These operations are needed for both RAD generated objects and programmer generated objects. Describe briefly how each of these four steps are accomplished in Delphi for both RAD and programmer generated objects, referring in each case to appropriate examples in the module notes. Also identify the typical circumstances for a small Delphi application under which RAD generated or programmer generated objects are used.
Problem 4.3 An object oriented traffic light
Code for a simple OO traffic light that works in a single direction is shown below. Change the object communication in this version to make use of properties, as described after the program listing....
Problem 4.4 Trapping references to non-existent objects
Description in the PDF
Problem 4.5 Inheritance for reuse
Description in the PDF
Part 4 Download
This is the end of Part 4 of the Delphi OOP Course. Here's the full source code for the examples described in chapters 8, 9, 10.- Download Part 4, Chapters 8-10 as a PDF document
Download Ful Source Code
Download Solution to Homework Problems
Source...