Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Gr10 or Gr11 Assignment Days

Activities - BASICS:
 Solve the following FOUR problems by using a GUI form with the necessary edit-box’s.
You must use labels to assist with user friendliness.
 Use an editbox(s) to enter the input and use a “Calculate”-button to determine the values
and then display the answers in another “edit-box”.
 Include also the Retry –button with the necessary code.
 Each problem is a separate application/program.

Calculations with Delphi

1. Enter the following numbers 123.56, 324.56, 178.44, 87.26 and determine the
a. Sum
b. Average
c. Round off the sum to the nearest integer
2. Assume the following measurements is available:
a. Length: 2.5 m, breadth: 1.5 m. Determine the area of the right angle rectangular.
(length X breadth)
b. Length: 1.8m. Determine the area of a square. (Length X length)
c. Base: 4.3 cm and perpendicular height 5.5 cm. Determine the area of the triangle.
(base X height X 0.5)
3. Assume the following formula exists. Enter the numbers as input and determine the final
value of the formula (use a button for each):
a. (m = 3, c = -5, x = -2 ); ; determine the value of y
b. ( x= 3, y = 4); ; determine the value of r

c. where a := 2, b := 3 en c:= 1; determine the value of x

CHALLENGE
4. Assume that you have paid R3.85 for a soft drink. The amount of money you enters as
payment is R10. Determine the
a. change.
b. number of coins to be used as change. The least amount of coins must be used.
Look at the following:
R 10 – R 3.85 = R 6.15 i.e. 1 R5 coin
R 6.15- R5 = 1.15, i.e. 1 R1 coin
R1.15 – R1 = 0.15, i.e. 1 10c coin
R 0.15 – R0.10 = 0.05, i.e. 1 5c coin
Hint: Use the div and mod functions in helping determine the correct answers.
Coins available in R10 for example is: 2 R5, 2 R2, 1 1R for example.

Assignments
Gr10 or Gr11 Assignment Days

5. A builder needs an application to calculate the cost for tiling a room. The size of the
tiles are 0.2m X 0,2 m and cost of one tile is R1.50. The formula to calculate the cost
is:

COST = Area of room ÷ Area of tile X R1.50


= Length X Width ÷ 0.04 X R1.50

The program uses the following:


 A panel for the heading ROGER's TILING COMPANY (2)
 An Edit Box and two buttons to enter the length and width. (4)
 A Third Button that calculates the cost and display the cost in a memo box. (4)
 A memo-box to display the output
[10]
=========================

Assignments

You might also like