|
What should you know about Delphi?
Grade 10
General / Introduction Programming environment GUI Event Handlers Events such as OnClick, OnClose, OnShow, OnMouseMove Components: Edit, Checkbox, Radio Group, Label, Panel, Listbox, RichEdit, Memo, BitButton Form class
Data Types and variables Integer, Real, Character String, Boolean Scope of variables
Input & Output InputBox Input and output components and properties: Edit, Checkbox, Radio Group, Label, Panel, Listbox, RichEdit and Memo Formatting output in RichEdit using tabs and new line / return characters
Operators & Operations Mathematical: +, -, *, /, Div, mod Relational: <, >, =, <>, <=, >= Boolean: AND, OR, NOT Precedence and brackets Simple string manipulation: Length, Pos, Concat (+), Uppercase, Copy, Delete, Insert, Val
Includes data type conversion such as IntToStr, StrToInt, StrToFloat, StrToIntDef, FloatToString, FloatToStrF, to be able to do mathematical and string manipulations
Control structures Sequential Selection - Single selection IF … then - Double selection IF … then … else - Multiple selection Case Repetition - Counting For … do - Conditional While … do - Repeat … until
Classes and objects Form Class
Methods (functions and procedures) Mathematical such as sqr, sqrt, round, trunc, abs, random, power, min, max, frac, int, odd, dec, inc, etc . Modules - Simple user defined functions and procedures using parameter passing e.g. CalcInterest(12) if 12% interest should be added, GetMonthName(6) to determine the name of month number 6. (not reference parameters) Call functions and procedures
GUI IDE – Delphi
Defensive programming Meaningful error messages to user e.g. message dialogue boxes Error checking techniques - Check that data has been entered / compulsory fields - Check that the right type of data has been entered e.g. Real or Integer using VAL-procedure - Check that data is valid (falls between a certain range) - Use the MaskEdit to ensure valid data (for use in projects only)
Algorithms / problem solving and fundamental programming concepts Swop two values Determine smallest, largest value of more than two values Isolate digits in an integer value Determine whether a number is a prime number, even, odd number Determine whether a number is a factor of another number
Grade 11
Data structures Database with two tables 1 D arrays Classes and Objects
Control structures Sequential Selection (nested) Repetition (nested) - Conditional While … do - Repeat … until Including sentinel value (flag)
1-D Arrays - Declare - Basic I/O manipulation - Simple sort using a method in a class - Sequential search (including use of sentinel value) using a method in a class - Simple calculations such as calculating average, sum
Database and programming • Setup ADO connection • Use tables in database and manipulate records and fields through Delphi code using SQL statements • Find a specific record in a table using Locate
Classes and objects • Creation of classes and class design • Coding methods (including constructors, get/set, toString) to perform calculations or manipulate the attributes of an object.
GUI Delphi IDE Events and event handlers Components as specified in Grade 10 as well as PageControl with pages, DBGrid
Defensive programming Try…Except Try…Finally Data validation, e.g. checking for presence, range, uniqueness, length, type and check-digit. Return meaningful error messages
Operations Sting manipulation: All methods used in Grade 10 as well as Insert, Delete
Algorithms / problem solving Data validation
Grade 12
Data structures Text files Arrays – 2D Classes and Objects Database – at least 2 tables Array of objects (1 D)
Database and programming • Setup ADO connection • Use tables in database and manipulate records and fields through Delphi code using SQL statements
Classes and objects • Create arrays of objects • Create classes using inheritance (for implementation in 2009) • Create arrays of objects of parent and inherited classes (for implementation in 2009)
GUI Events and event handlers Delphi IDE Events and event handlers Components OnExit events to be used with error control
Operations Text files: • AssignFile • Reset / Rewrite • Readln / Write / Writeln • CloseFile • While not Eof • Import data from text file • Export data to text file String manipulation 2D arrays • Simple processing e.g. row and column totals Array of object manipulation
Algorithms and problem solving Data validation and defensive programming using components, programming techniques specified in Grades 10 and 11 as well as code in OnExit events. Design own algorithms to solve problems
(Taken from LPG Document, Jan. 2008)
|