Selasa, 05 Juni 2012

Jawaban Soal UTS PBD I Kelas C,D

Uuuhh lama ga posting nih,..hehehehehe
Sehubungan dengan berlangsungnya Ujian Tengah Semester (UTS) kemarin jadi saya ingin posting jawaban soal PBD I kelas C & D . . . .
Ok pertama tama kita selesaikan soal yang pertama dulu,..
Desain saja formnya seperti ini.


Nah setelah desainya sesuai dengan di atas lalu isikan properties di text1,text5,text6,text7 & combo1 seperti di bawah ini.
Text1 = MaxLength =3
Text5 = InputMask = Rp 999,999,999  & Value = 0
Text6 = InputMask = Rp 999,999,999  & Value = 0
Text7 = InputMask = Rp 999,999,999  & Value = 0
Combo1 = RowSource = KOMPUTER AKUNTANSI,MANAJEMEN INFORMATIKA,SISTEM INFORMASI,TEKNIK INFORMATIKA  & RowSource = 1. Value
Nah setelah properties di atas sudah terisi lalu isi kan coding  di form Activate seperti berikut.
SET DATE ITALIAN
thisform.text1.Value=DATE()
thisform.text5.Value=200000
thisform.optiongroup1.Value=0
thisform.text2.SetFocus

Di Combo1
jurusan=thisform.combo1.Value
DO case
case jurusan="KOMPUTER AKUNTANSI"
thisform.text7.Value =1250000
CASE jurusan="MANAJEMEN INFORMATIKA"
thisform.text7.Value =1000000
CASE jurusan="SISTEM INFORMASI"
thisform.text7.Value =1500000
CASE jurusan="TEKNIK INFORMATIKA"
thisform.text7.Value =1750000
ENDCASE

Di Command Button Proses
thisform.text6.Value=thisform.text5.Value+thisform.text7.value
Di Command Button Clear
thisform.text2.Value=""
thisform.text3.Value=""
thisform.text4.Value=""
thisform.optiongroup1.Value=0
thisform.combo1.Value=""
thisform.text6.Value=0
thisform.text7.Value=0
thisform.text2.SetFocus

Di Command Button Keluar
thisform.Release
Nah nih hasilnya setelah di jalankan
 
Nah sekarang kerjakan soal no 2-nya,…desain dulu formnya seperti di bawah ini


Lalu isi kan properties Value  pada text1 & text2 = 0..
Nah setelah itu isikan coding berikut di form Activate

thisform.text1.Value=100
thisform.text2.SetFocus


Di command button Proses List
a=12
DO while a<=thisform.text1.Value
thisform.list1.AddItem(STR(a))
a=a+thisform.text2.Value
ENDDO

Di command button Exit
thisform.Release

Di command button Clear
thisform.list1.Clear
thisform.text2.Value=0
thisform.text2.SetFocus

nah setelah di jalankan maka hasilnya akan seperti ini



Nah selesai sudah,..silahkan di coba di rumah semoga bisa membantu anda,..
Kalo ada yang kurang paham silahkan koment aja di bawah yha,..

Silahkan Download Programnya di
http://www.komputerkampus.com/file/89uts_pbd_1_c_d.rar/

Tidak ada komentar:

Posting Komentar