P. 1
59081003006(1)

59081003006(1)

|Views: 2|Likes:
Published by Adi Suanditha

More info:

Published by: Adi Suanditha on Dec 30, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

12/30/2013

pdf

text

original

1

ARTIKEL
OBJECT ORIENTED PROGAMMING DALAM PEMROGRAMAN
VISUAL MENGGUNAKAN C++ BUILDER
DISUSUN OLEH
NAMA : LILIS NURJANAH
NIM : 59081003006
UNIVERSITAS SRIWIJAYA
FAKULTAS ILMU KOMPUTER
JURUSAN SISTEM INFORMASI BILINGUAL
2010
2
DAFTAR ISI
DAFTAR ISI
................................................................................................................................................
2
BAB 1 PENDAHULUAN
................................................................................................................................................
3
1. Penge!"#n O$%e&! O"en!e'(((((((((((((((((((((3
2. )*n+e, D#+# Pe-*g#-#n Be*"en!#+"
O$%e&!(((((((((((((((((((((((((((((..
BAB 2 OBJE/T ORIENTED PRO0RAMMIN0 DALAM PEMRO0RAMAN 1ISUAL
MEN00UNA)AN /22 BUILDER((((((((((((((((((((..6
1. )*n+e, ,enge-$#ng#n #,3"4#+" 5"+6#3(((((((((((((((((6
2. Pengen#3#n O$%e&! O"en!e' '#3#- ,e-*g#-#n 5"+6#3 Mengg6n#4#n /22
B6"3'e(((((((((((((((((((((((((((((.6
DAFTAR PUSTA)A((((((((((((((((((((((((((12
3
BAB 1
PENDAHULUAN
1.Pene!"#$n O%&e'" O!#en"e(
O$%e&! O"en!e' P*g#--"ng #'#3#7 +6#!6 -e!*'e '#3#- ,e-$6#!#n ,*g#-8 'eng#n
!6%6#n 6n!64 -en9e3e+#"4#n 4*-,3e4+n9# $e$#g#" -#+#3#7 ,*g#- 9#ng !e6+
-en"ng4#!. A'#,6n *$%e&! *"en!e' ,*g#--"ng '#3#- ,e-*g#-#n 5"+6#3
-engg6n#4#n /22 B6"3'e '"$#g" -en%#'" '6# $#g"#n ,en!"ng 9#"!6 ,*,e!"e+ '#n e5en!.
T#76n 19608 '"!e-64#n +6#!6 ,e-$6#!#n ,*g#- 9#ng !e+!64!6 :+!6&!6e'
,*g#--"ng;. Me!*'e "n" '"4e-$#ng4#n '#" $#7#+# / '#n P#+&#3.
Deng#n -engg6n#4#n OOP -#4# '#3#- -e3#464#n ,e-e&#7#n +6#!6 -#+#3#7 4"!# !"'#4
-e3"7#! $#g#"-#n# &## -en9e3e+#"4#n +6#!6 -#+#3#7 !e+e$6! :!e+!64!6; !e!#," *$%e4<
*$%e4 #,# 9#ng '#,#! -e3#464#n ,e-e&#7#n -#+#3#7 !e+e$6!. Se$#g#" &*n!*7 #ngg#,
4"!# -e-"3"4" +e$6#7 'e,#!e-en 9#ng -e-"3"4" -#n#ge8 +e4e!#"+8 ,e!6g#+
#'-"n"+!#+" '#!# '#n 3#"nn9#. M"+#3 -#n#ge !e+e$6! "ng"n -e-,e*3e7 '#!# '#" $#g
#'-"n"+!#+" -#4# -#n#ge !e+e$6! !"'#4 7#6+ -eng#-$"3n9# 3#ng+6ng !e!#," '#,#!
-en9667 ,e!6g#+ $#g #'-"n"+!#+" 6n!64 -eng#-$"3n9#. P#'# 4#+6+ !e+e$6! +e*#ng
-#n#ge !"'#4 7#6+ -enge!#76" $#g#"-#n# &## -eng#-$"3 '#!# !e+e$6! !e!#," -#n#ge
$"+# -en'#,#!4#n '#!# !e+e$6! -e3#36" *$%e4 ,e!6g#+ #'-"n""+!#+". J#'" 6n!64
-en9e3e+#"4#n +6#!6 -#+#3#7 'eng#n 4*3#$*#+" #n!# *$%e4<*$%e4 9#ng #'# 4#en# +e!"#,
*$%e4 -e-"3"4" 'e+4",+" !6g#+n9# +en'"".
.
2.K)n*e+ D$*$! Pe,!)!$,$n Be!)!#en"$*# O%&e-
)*n+e, '#" OOP +e$en#n9# -en"64#n 4e7"'6,#n n9#!#8 '"-#n# +e-6#n9#
#'#3#7 *$%e4 9#"!6 :
O$%e4 = D#!# 2 Me!*'e
D#!#
> An#3*g"4#n +e$#g#" 1#"#$e3 #!#6 )*n+!#n!#
> )##4!e"+!"4 '#" *$%e4
Me!*'e
> F6n&!"*n?P*&e'6e
> A4+" Te7#'#, D#!#
)*n+e, OOP ,#'# 6-6-n9# -en'646ng 7#3 +e$#g#" $e"46! :
• Ke.$*/ -e6,#4#n 46-,63#n #!#+ 'e@"n"+" '#!# '#n @6ng+"<@6ng+" '#3#- +6#!6
6n"! 6n!64 +6#!6 !6%6#n !e!en!6. M"+#3n9# 4e3#+ ,)%#. 9#ng -en6n%64 ,#'#
$e$#g#" -#&#- *$%e4 9#ng 3e$"7 6-6- '#" -*$"3 "!6 +en'"" :g#-$##n
+e&## 6-6-;.
• O%&e-/ -e6,#4#n '#+# '#" +e$6#7 -*'63 '#n +!64!6 '#3#- +e$6#7
,*g#- 4*-,6!e 9#ng $e*"en!#+" *$%e4. M"+#3n9# '#" 4e3#+ ,)%#. !#'"
9#ng '#,#! 4"!# 'e@"n"+"4#n +e&## 3e$"7 +,e+"@"4 '#n -en'e!#"38+e+6#" 'eng#n
&"" @"+"4 9#ng n9#!# '#" *$%e4 !e+e$6!.
• Deng#n -engg6n#4#n object oriented programming -#4# '#3#-
-e-e&#74#n +e$6#7 -#+#3#7 4"!# !"'#4 -e3"7#! $#g#"-#n# &##
-en9e3e+#"4#n +6#!6 -#+#3#7 !e!#," *$%e4<*$%e4 #,# 9#ng '#,#! -e3#464#n
,e-e&#7#n -#+#3#7 !e+e$6!. D#3#- 7#3 "n" *$%e4<*$%e4 9#ng #'# +6'#7
!e'e@"n"+" 6n!64 -e3#464#n 4eg"#!#nn9# -#+"ng<-#+"ng84"!# !"'#4 ,e36
-enge!#76" $#g#"-#n# &## 4e%#n9#. A#ng '"!e4#n4#n #'#3#7 $#g#"-#n#
5
*$%e4<*$%e4 !e+e$6! $e@6ng+" +e+6#" !6g#+n9# '#n $e4*3#$*#+" 6n!64
-en9e3e+#"4#n +6#!6 -#+#3#7.
• A%*"!$-*#/ -e6,#4#n 4e-#-,6#n +e$6#7 ,*g#- 6n!64 -e3eB#!" #+,e4
"n@*-#+" 9#ng '",*+e+ *3e7n9# #!#6 4e-#-,6#n 6n!64 -e@*46+ ,#'# "n!".
Se!"#, *$%e4 '#3#- +"+!e- -e3#9#n" +e$#g#" -*'e3 '#" ,e3#46 #$+!#4 9#ng
'#,#! -e3#464#n 4e%#83#,*#n '#n ,e6$#7#n 4e#'##nn9#8'#n $e4*-6n"4#+"
'eng#n *$%e4 3#"nn9# '#3#- +"+!e-.
• En-$+*0.$*#/ -e6,#4#n +e$6#7 -e!*'e 9#ng -e-#+!"4#n ,engg6n# !"'#4
'#,#! -eng6$#7 +e$6#7 *$%e4 +e&## 3e36#+#87#n9# -e!*'e '#3#- *$%e4
!e+e$6! 9#ng '""C"n4#n 6n!64 -eng#4+e+ 4e#'##nn9#. D#3#- 4#!# 3#"n
-eng*n!*3 7#4 #4+e+ ,engg6n# '#3#- -e3#464#n ,e6$#7#n ,#'# +6#!6
*$%e4. )#en# #n!## *$%e4 9#ng +#!6 'eng#n 9#ng 3#"nn9# "!6 +#3"ng
$e"n!e#4+".
• P).#,)!1#*,e/ -e3#36" ,eng""-#n ,e+#n. T"'#4 $eg#n!6ng ,#'#
,e-#ngg"3#n +6$6!"n8$#7#+# *"en!#+" *$%e4 '#,#! -eng""- ,e+#n8-e!*'e
!e!en!6 9#ng $e76$6ng#n 'eng#n +e$6#7 ,eng""-#n ,e+#n !eg#n!6ng ,#'#
*$%e4 !e!en!6 '" -#n# ,e+#n !e+e$6! '"4""-.
6
BAB 2
OBJECT ORIENTED PROGRAMING DALAM PEMROGRAMAN VISUAL
MENGGUNAKAN C++ BUILDER
1. K)n*e+ Pene,%$n$n A+.#-$*# V#*0$.
Me6%64 ,#'# ,eng6n##n 4*-,*nen<4*-,*nen $#"4 5"+6#3 -#6,6n 4*-,*nen<
4*-,*nen n*n<5"+6#3 9#ng -e6,#4#n *$%e4 9#ng !e3#7 !e+e'"# '#n '#,#!
'"g6n#4#n +e&## 3#ng+6ng :"n+!#n;.
D#3#- ,e-*g#-#n 5"+6#3 '"4en#3 #'#n9# Event-driven programming 9#"!6
+e$6#7 ,*g#- 9#ng '"$6#! '"4en'#3"4#n '#n $e%#3#n $e'#+#4#n +6#!6
4e%#'"#n :event; #!#6 ,e"n!#7 9#ng '"$e"4#n *3e7 programmer. Event #!#6
,e"n!#7 9#ng -en-trigger #!#6 -e-"&6 function '"7#+"34#n *3e7 +e$6#7 moment.
D#3#- 4*n+e, +6#!6 *$%e4 '"4en#3" #'#n9# '6# 4*-,*nen 9#"!6 :
• Properties #!#6 #!"$6!8 9#ng -e-"3"4" n"3#" '#n n#-#.
• Event (function,method,action,behaviour) 9#ng 7#n9# -e-"3"4" n#-#.
)*n+e, event '#3#- +e$6#7 *$%e4 '"#ngg#, +#ng#! ,en!"ng 4#en# *$%e4 !"'#4
#4#n -e3#464#n +6#!6 action #!#6 +6#!6 4eg"#!#n8*$%e4 7#n9# #4#n '"#- %"4#
!"'#4 #'# event 9#ng '"$e"4#n. Se,e!" 9#ng 4"!# 4e!#76" *$%e4 7#n9#3#7 +e$6#7
$en'# '#n !#4 ,en#7 -e3#464#n +e$6#7 action %"4# !"'#4 #'# +e$6#7 ,e"n!#7
6n!64 -engge#44#nn9#.
2. Penen$.$n O%&e'" O!#en"e( ($.$, +e,!)!$,$n 2#*0$. Men0n$-$n C++
B0#.(e!
Pe-*g#-#n 5"+6#3 '#,#! -en6n%644#n *$%e4<*$%e4 9#ng '"g6n#4#n '#3#-
-en&#" +*36+" #!#6 ,e-e&#7#n -#+#3#7 +e&## g#@"+ #!#6 n9#!#. O$%e4<*$%e4
9#ng '"g6n#4#n !e+e$6! -engg6n#4#n 4*n+e, object oriented programming.
D
Deng#n #'#n9# 4*n+e, object oriented programming *$%e4 9#ng 4"!# $6#! '#3#-
,e-*g#-#n 5"+6#3 '#,#! $e%#3#n +e$#g#"-#n# 9#ng 4"!# "ng"n4#n.
Se$#g#"-#n# !e3#7 '"+"ngg6ng '" #!#+ 4"!# &646, -engg6n#4#n *$%e4<*$%e4 9#ng
!e3#7 '"+e'"#4#n '#3#- ,e-*g#-#n 5"+6#38 4"!# !"'#4 ,e36 +6+#7<+6+#7
-en&",!#4#n *$%e4 9#ng !e3#7 #'# &646, 4"!# -*'"@"4#+" '#n g6n#4#n +e+6#"
4e$6!67#n 4"!# !e7#'#, *$%e4 !e+e$6!. D#3#- ,e-*g#-#n 5"+6#3 4"!# &646,
-en'e@"n"+"4#n e5en!<e5en! 9#ng #4#n !e%#'" ,#'# *$%e4 !e+e$6!. J#'"8'#3#-
,e-$6#!#n +6#!6 ,*g#- #!#6 #,3"4#+" 9#ng $e$#+"+ 5"+6#3 4"!# &646,
'"-6'#74#n 'eng#n *$%e4<*$%e4 9#ng !e3#7 !e+e'"# !e+e$6!. Deng#n 4#!# 3#"n
#'#n9# ,e-*g#-#n 5"+6#3 "n" &646, -e-$#n!6 '#3#- ,e-$6#!#n ,*g#-
#,3"4#+" 'eng#n -en'646ng 4*n+e, object oriented programming.
M"+#3 4"!# "ng"n -e-$6#! +e$6#7 #,3"4#+" +e'e7#n# 'eng#n -eng6n#4#n /22
$6"3'e. )"!# !"ngg#3 -engg6n#4#n *$%e4<*$%e4 9#ng !e3#7 '"+e'"#4#n +e+6#"
4e$6!67#n 4"!#. M"+#3n9# @*-83#$e38e'"!8$6!!*n8'#n 3#"n<3#"n. O$%e4<*$%e4
!e+e$6! n#n!"n9# #4#n '#,#! $e4e%# +e+6#" 'eng#n @6ng+"n9# !eg#n!6ng event
9#ng 4"!# $e"4#n. A#ng -en%#'" *$%e4 '#3#- 7#3 "n" #'#3#7 @*-83e$e38e'"!8$6!!*n
#!#6 *$%e4 3#"n 9#ng 4"!# !#-$#74#n ,#'# #,3"4#+" 9#ng 4"!# $6#!.
Deng#n &*n!*7 ,*g#- '"$#B#7 "n" 4"!# #4#n -e-#7#-" OOP '#3#-
,e-*g#-#n 5"+6#3 -engg6n#4#n /22 :
Un!64 -e-$6#! #,,3"4#+" '"#!#+ 4"!# -e-$6!674#n:
8
#. F*-1
< P*,e!"e+
o /#,!"*n= A,3"4#+" Seg"!"g#
o B*'e+!93e= +"ng3e
o N#-e= FU!#-#
o P*+"!"*n= +&een&en!e
o F*n! = 5e'#n#:+"Ce 10;
< E5en!
o On&e#!e :
5*"'EE@#+!&#33 TFU!#-#::TFU!#-#:T/*-,*nen!F OBne;
: TF*-:OBne;
G
H
$. L#$e31
< P*,e!"e+
o /#,!"*n= A3#+
o N#-e= 3#$e31
&. L#$e32
< P*,e!"e+
o /#,!"*n = T"ngg"
o N#-e= 3#$e32
'. L#$e33
< P*,e!"e+
o /#,!"*n=L6#+
o N#-e=3#$e3
e. E'"!1
< P*,e!"e+
o N#-e =E'"!1
o TeI! = <
@. E'"!2
< P*,e!"e+
o N#-e=E'"!2
o TeI! = <
g. E'"!3
< P*,e!"e+
o N#-e=E'"!3
o TeI!= <
9
7. B6!!*n1
< P*,e!"e+
o /#,!"*n = H"!6ng
o N#-e= $6!!*n1
< E5en!
o On&3"&4 :
5*"' EE@#+!&#33 TFU!#-#::B6!!*n1/3"&4:TO$%e&! FSen'e;
G
@3*#! #3#+8 !"ngg"8 36#+J
#3#+ = S!T*F3*#!:E'"!1<KTeI!;J
!"ngg" = S!T*F3*#!:E'"!2<KTeI!;J
36#+ = 0.5F#3#+F!"ngg"J
E'"!3<KTeI! = F3*#!T*S!:36#+;J
H
". B6!!*n2
< P*,e!"e+
o /#,!"*n = Re@e+7
o N#-e= $6!!*n2
< E5en!
o On&3"&4
5*"' EE@#+!&#33 TFU!#-#::B6!!*n2/3"&4:TO$%e&! FSen'e;
G
E'"!1<K/3e#:;J
E'"!2<K/3e#:;J
E'"!3<K/3e#:;J
H
%. B6!!*n3
< P*,e!"e+
o /#,!"*n=T6!6,
o N#-e=B6!!*n3
< E5en!
o On&3"4
5*"' EE@#+!&#33 TFU!#-#::B6!!*n3/3"&4:TO$%e&! FSen'e;
G
!7"+<K/3*+e:;J
H
10
R6nn"ng P*g#-
T#-,"3#n ,*g#-:
Se!e3#7 '" "+":
11
J"4# '" e@e+7 -#4# !#-,"3#nn9# +e,e!" $e"46! :
In"3#7 ,en%#$##n *$%e&! *"en!e' '#3#- ,e-*g#-#n 5"+6#3 -eng6n#4#n /22 $6"3'e.
Deng#n #'#n9# ,e-*g#-#n 5"+6#3 ,*g#- ? #,3"4#+" 9#ng 4"!# $6#! '#,#! +e&## real
4"!# 3"7#! #g# interface #!#6 ,eng76$6ng 'eng#n ,*g#- ? #,3"4#+" "!6 3e$"7 -6'#7.
12
DAFTAR PUSTA)A
He9#n!*. I-#- '#n R#7#%*. B6'"8 pemrograman Borland C++ Builder8
In@*-#!"4# B#n'6ng8 2006.
F#&76*CC". M '#n 06+!"#B#n @e9. onsep dan !pli"asi Pemrograman
mengguna"an Borland C++ Builder #.:M*'63 1"+6#3 Re5"+";
$$$.$i"ipedia.com

............. Pengen#3#n O$%e&! O "en!e' '#3#....... 3 1.......................................... )*n+e.........................................*g #-#n 5"+6#3 Mengg6n#4#n /22 B6"3'e (((((((((((((((((((((((((((((....................... ........ 2 BAB 1 PENDAHULUAN .6 1.......... )*n+e......6 DAFTAR PUSTA)A((((((((((((((((((((((((((12 .......... D#+# Pe...............e...............2 DAFTAR ISI DAFTAR ISI ......................................................................enge-$#ng#n #...........3"4#+" 5"+6#3(((((((((((((((((6 2.....*g #-#n Be * "en!#+" O$%e&!(((((((((((((((((((((((((((((........ BAB 2 OBJE/T ORIENTED PRO0RAMMIN0 DALAM PEMRO0RAMAN 1ISUAL MEN00UNA)AN /22 BUILDER((((((((((((((((((((. Penge !"#n O$%e&! O "en!e'(((((((((((((((((((((3 2....................

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->