Professional Documents
Culture Documents
Coursework: Learning Area 5 Programming
Coursework: Learning Area 5 Programming
LEARNING AREA 5
PROGRAMMING
Practical Session
Please refer to Appendix B
Use Visual Basic to answer Question 6
RF.CW.LA5.S10.1
1. Problem Analysis
a. Problem Program untuk mengira luas segitiga
Statement
OUTPUT LUAS
TAMAT
RF.CW.LA5.S10.1
a. User
Interface Program to Calculate the Area
Design for of a Rectangle
Input input
Length of Rectangle
Width of Rectangle
Calculate
RF.CW.LA5.S10.1
b. User
Interface Program to Calculate the Area
Design of a Rectangle
for
Output
Length of Rectangle
output
Width of Rectangle
Area of Rectangle is xx
Calculate
RF.CW.LA5.S10.1
3. Coding
(refer to program submitted)
File name: S10_1.vbp Location: c:\ \Desktop\SKxxxA000\
4. Testing and Debugging
a. State the data Input item (s) Input data
used for each length 5
input item listed
width 6
in 1(b).
b. Write the Output item(s) Actual Output
output based area 30
on the input
data in 4(a)
c. Name of the S10_1.exe
executable file
Start Visual Basic
frmMain
txtLength
txtWidth
cmdExit
cmdCalc
lblArea
Private Sub cmdCalculate_Click()
length = Val(txtLength.Text)
width = Val(txtWidth.Text)
area = length * width
End Sub
Private Sub cmdExit_Click()
End
End Sub
to compile
Thank You