Delphi for CAPS part 1

30Cover part 1

ISBN 978-0-9922227-0-3    print

ISBN 978-0-9922227-1-0    eBook

272 pages

77 Exercises

Contents

The Delphi Integrated development environment (IDE)

  • How to add components to the form
  • Introduction to classes and objects (referring to controls/components
  • How to change properties of components in the object inspector
  • How to change the properties of objects with code
  • Methods to perform tasks
  • Use basic controls for input and output
  • Input from edits, combo box radiogroup checkbox
  • The parameters of a richedit, Showmessage,  Message dialog, Inputbox
  • HCI principles (How GUI will meet the users’ needs)
  • GUI model paper prototype

Variables, Calculations And Functions

  • Simple data types (integer, real/decimal, character, string, Boolean)
  • Variables in Scratch and in Delphi
  • Declaration of variables
  • Where to declare variables – Scope of variables
  • How to declare variables
  • Plan your program: Input Processing Output
  • Assignment of values to variables
  • Convert input to numeric values
  • Arithmetic Operators
  • Order of precedence
  • Increasing and decreasing Integers:  Inc and dec
  • Display calculated values in Output components
  • Formatting the output
  • Constants
  • Integer division and retrieving remainders – DIV and MOD

Functions

  • Functions (In Sysutils)
  • Random function
  • Functions in the MATH class
  • Functions using Date and Time in Sysutils
  • Functions using Date and Time in the Dateutils class
  • Calling built-in Functions
  • How to write your own auxiliary methods (functions)

Decisions:If, If- Else And Case

  • Boolean expressions
  • Boolean / Logic operators: NOT AND OR
  • Order of precedence
  • Types of decision making constructs:
  • Simple IF (without an else)
  • Simple IF with begin and end
  • Simple IF using and and or
  • Simple if then else (only one statement in the then and else
  • If then else with multiple statements
  • Nested if statements
  • Case statements
  • Sets

How To Prevent Errors Or Find The Errors To Debug Your Program

  • Comment statements
  • Indentation
  • Debugging techniques: Use compiler messages to identify syntax errors
  • Use Watches to see how the values stored in variables change
  • Function keys to trace into your source.
  • Breakpoints to stop the program at the point you want to investigate
  • Use messages to display interim values
  • Trace tables to identify logical errors in code constructs
  • Validation to prevent runtime errors
  • Test data

Simple iteration

  • For loop
  • For-loops with more than one statement in the loop
  • Nested for-loops
  • Conditional iteration
  • While loops
  • Repeat loops
  • Sentinel-controlled loops

Addendum: Basic components


Hit Counter provided by laptop reviews