1. Home
  2. Computing & Technology
  3. Delphi Programming

Homework Problems

By Zarko Gajic, About.com

OOP Chaper 3 Problem 1.3

Problem 1.1 Study Chapter 1

Identify the appropriate example(s) or section(s) of the chapter to illustrate each comment made in the summary above.

Problem 1.2 Replace exception handling with If statements

Replace all the exception handling statements in example 1.3 step 7 with If statements.

Problem 1.3 Changed interface

The user interface given for example 1.3 step 7 mixes buttons and RadioButtons, leading to a confused user interface and to repetitive coding. Recode this program, replacing the various buttons with a single RadioGroup. Use exception handling rather than If statements to respond to object reference errors.

Problem 1.4 Auto-create and program controlled create and free

In example 1.3 step 7 we remove frmAuxiliary from the auto-create list and then create and free it under program control. What happens if we leave frmAuxiliary in the auto-create list but still use the revised program given in example 1.3 step 7?

Problem 1.5 Creating objects explicitly

If you have coded problem 1.4 successfully, use it as a starting point for this problem. Modify it to define the auxiliary form in code similarly to example 1.4. If you have not coded problem 1.4 successfully, use example 1.4 as a starting point.
  1. On the auxiliary form define two buttons, btnBlue and btnGreen, in code (ie not using RAD facilities). Give each an OnClick event handler to change the colour of the auxiliary form between MoneyGreen and SkyBlue.
  2. Draw the matching UML diagrams, showing composition explicitly.

That's it for the first 3 chapters!

Download Chapters 1-3 as a PDF document.

Download Ful Source Code.

Download Solution to Homework Problems.

Forward to Part 2 / Chapter 4: Introduction to class inheritance

Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. OOP in Delphi
  6. Free Online OOP Course
  7. Learning Object Oriented Programming with Delphi: Chapter 3

©2009 About.com, a part of The New York Times Company.

All rights reserved.