30Cover part 3Delphi for CAPS Part 3

ISBN 978-0-9922227-4-1  print

ISBN 978-0-9922227-5-8  eBook

260 pages

55 exercises


Algorithms and problem-solving skills

5 steps in the design cycle

User defined classes and objects

  • What is a class?
  • Example of your own class
  • What is an object?
  • Encapsulation
  • Various types of methods in relation with their use and purpose
  • Constructors
  • Destructors
  • Mutators
  • Auxiliary methods
  • Develop a simple user-defined class
  • Create class tparcel
  • Instantiate a user-defined object
  • Call constructors, destructors, accessors, mutators, auxiliary

Multi-form GUI

Public properties to share data amongst forms

Relational databases

  • Adoqueries to display fields from more than one
  • Syntax for the sql.text to use two tables:
  • To display records from a query in a richedit
  • Insert new records in a relational database.
  • Update records in a relational database.
  • Delete records in a relational database.

Data modules

  • To add a data module:
  • To use a data module in the form unit

Use an object class and data module in one program

Dynamically create forms only when you need it

  • To create a modal form dynamically
  • To create a non-modal form dynamically

Two dimensional arrays

  • Declaration
  • Input data into a 2d array
  • To display the data in a 2d array in a richedit
  • To display the data in a 2d array in a string grid
  • Set the size of the string grid
  • Add labels in the fixed columns
  • Step through items to do basic operations
  • Calculate row totals and averages in a 2d array
  • Calculate column totals and averages in a 2d array
  • Calculate the smallest value in the whole array
  • Calculate the largest value in the whole array

Structured query language

  • Query a database with more than one table using simple sql constructs
  • Syntax for the sql.text
  • To show all fields and all the records in a table in the db grid
  • To show certain fields (columns) in a table in the db grid
  • Where: to show certain records (rows) in a table
  • And /or: multiple conditions in the where clause
  • Between: to limit the range in the where clause
  • In : using sets in sql statements…
  • As: to display a column heading different from the field name
  • Round() and int() functions: to display less decimals
  • Calculated fields: to display a column that is not in the database
  • Left() right() mid() and instr() : to create substrings
  • Lcase and ucase: to display letters in lowercase  and uppercase
  • Format function: to display formatted dates and numbers
  • Order by: to sort records in ascending or descending order
  • Top n: to display records with the highest or lowest values in a field
  • User input in sql queries
  • Group by: to get aggregates on subgroups
  • Having: to add conditions on aggregates
  • To display records from a query in a richedit
  • To change data in the database:
  • Insert
  • Simple sub queries
  • Sub-queries with the select statement:
  • Sub-queries with the insert statement:
  • Sub-queries with the update statement:
  • Sub-queries with the delete statement:

Practise problem solving skills – test and evaluate given solutions

  • Non-database problems
  • Database problems

Hints to prepare for examinations

Hit Counter provided by laptop reviews