19
BAB III PENGOLAHAN DATA 3.1. Properties 3.1.1. Properties Form 1 Pengaturan properties dari masing-masing objek pada form 1 dapat dilihat pada Tabel 3.1. Gambar 3.1. Tampilan Awal Form 1 Tabel 3.1. Pengaturan Properties pada Form 1 Objek Properties Nilai Form 1 (Name) Awal Caption Form 1 Picture (Bitmap) Image 1 (Name) Image1 Picture (Bitmap) Label 1 (Name) Label 1 Caption Perhitungan ERR Font Font = Bookman Old Style ; Font Style = Bold ; Font Size = 20

Bab 3 ampun

Embed Size (px)

Citation preview

Page 1: Bab 3 ampun

BAB III

PENGOLAHAN DATA

3.1. Properties

3.1.1. Properties Form 1

Pengaturan properties dari masing-masing objek pada form 1 dapat dilihat

pada Tabel 3.1.

Gambar 3.1. Tampilan Awal Form 1

Tabel 3.1. Pengaturan Properties pada Form 1

Objek Properties Nilai

Form 1(Name) Awal

Caption Form 1Picture (Bitmap)

Image 1(Name) Image1

Picture (Bitmap)

Label 1

(Name) Label 1

Caption Perhitungan ERR

Font Font = Bookman Old Style ; Font Style = Bold ; Font Size = 20

Command 1(Name) Command 1

Caption Menghitung ERR

Page 2: Bab 3 ampun

Tabel 3.1. Pengaturan Properties pada Form 1 Lanjutan

Objek Properties Nilai

Command 2(Name) Command 2

Caption Teori

Command 3(Name) Command 3

Caption About us

Command 4(Name) Command 4

Caption Keluar

3.1.2. Properties Form Teori

Pengaturan properties dari masing-masing objek pada form Teori dapat

dilihat pada Tabel 3.2.

Gambar 3.2. Tampilan Awal Form Teori

Page 3: Bab 3 ampun

Tabel 3.2. Pengaturan Properties pada Form Teori

Objek Properties Nilai

Form 2

(Name) Form2

Caption Teori

Picture (Bitmap)

Image 1(Name) Image1

Picture (Bitmap)

Command 2

(Name) Command 1

Caption Back

Font Font = MS Sans Serif; Font Style = Bold ; Font Size = 10

3.1.3. Properties Form About Us

Pengaturan properties dari masing-masing objek pada form About Us

dapat dilihat pada Tabel 3.3.

Gambar 3.3. Tampilan Awal Form About Us

Page 4: Bab 3 ampun

Tabel 3.3. Pengaturan Properties pada Form About Us

Objek Properties Nilai

Form 3(Name) Form3

Caption About UsPicture (Bitmap)

Image 1(Name) Image1

Picture (Bitmap)

Label 6

(Name) Label 6

Caption KELOMPOK III GELOMBANG 4

Font Font = Bookman Old Style ; Font Style = Bold ; Font Size = 18

Label 1

(Name) Label 1

Caption Yusuf Randy 110403105

Font Font = Bookman Old Style ; Font Style = Bold ; Font Size = 12

Label 2

(Name) Label 2

Caption Renida Hikmana 110403016

Font Font = Bookman Old Style ; Font Style = Bold ; Font Size = 12

Label 3

(Name) Label 3

Caption Sail Huda 110403033

Font Font = Bookman Old Style ; Font Style = Bold ; Font Size = 12

Label 4 (Name) Label 4

Caption Hasrul Limbong 110403105

Font Font = Bookman Old Style ; Font Style = Bold ; Font Size = 12

Label 5

(Name) Label 3

Caption Marintan Agustina 110403162

Font Font = Bookman Old Style ; Font Style = Bold ; Font Size = 12

Command 1(Name) Command 1

Caption Back

Page 5: Bab 3 ampun

3.1.4. Properties Form Menghitung ERR

Pengaturan properties dari masing-masing objek pada form 4 dapat dilihat

pada Tabel 3.4.

Gambar 3.4. Tampilan Awal Form Menghitung ERR

Page 6: Bab 3 ampun

Tabel 3.4. Pengaturan Properties pada Form Menghitung ERR

Objek Properties Nilai

Form 4 (Name) Form4

Caption Menghitung ERR

Label 1(Name) Label1

Caption P/F

Label 2(Name) Label2

Caption F/A

Label 3 (Name) Label 3

Caption N-t

Label 4 (Name) Label 4

Caption e

Label 5 (Name) Label5

Caption t

Frame 1 (Name) Frame 1

Caption Tahap 1

Frame 2 (Name) Frame 2

Caption Tahap 2

Frame 3 (Name) Frame 3

Caption Tahap 3

Label 6 (Name) Label6

Caption Et

Label 7 (Name) Label7

Caption Rt

Label 8 (Name) Label8

Caption N

Label 9 (Name) Label9

Caption i’

Label 10 (Name) Label10

Caption Kesimpulan

Label 11 (Name) Label11

Caption MARR

\

Page 7: Bab 3 ampun

Tabel 3.4. Pengaturan Properties pada Form 4 Lanjutan

Objek Properties Nilai

Command 1(Name) Command1

Caption Proses

Command 2(Name) Command2

Text Reset

Command 3(Name) Command3

Text Proses

Command 4(Name) Command4

Text Reset

Command 5(Name) Command5

Text Proses

Command 6(Name) Command6

Text Reset

Command 7(Name) Command7

Text Proses

Command 8(Name) Command8

Text Reset

Command 9(Name) Command9

Text Proses

Text 1(Name) Text1

Text (Kosongkan)

Text 2(Name) Text2

Text (Kosongkan)

Text 3(Name) Text3

Text (Kosongkan)

Text 4(Name) Text4

Text (Kosongkan)

Text 5(Name) Text5

Text (Kosongkan)

Text 6(Name) Text6

Text (Kosongkan)

Text 7(Name) Text7

Text (Kosongkan)

Text 8(Name) Text8

Text (Kosongkan)

Page 8: Bab 3 ampun

Tabel 3.4. Pengaturan Properties pada Form 4 Lanjutan

Objek Properties Nilai

Text 9(Name) Text9

Text (Kosongkan)

Text 10(Name) Text10

Text (Kosongkan)

Text 11(Name) Text11

Text (Kosongkan)

3.2. Coding

3.2.1. Coding Form 1

Adapun code yang ditulis pada jendela kode form 1 sebagai berikut:

Private Sub Command1_Click()

'memunculkan form4 dan menyembunyikan awal

awal.Hide

form4.Show

End Sub

Private Sub Command2_Click()

'memunculkan form1 dan menyembunyikan awal

awal.Hide

Form1.Show

End Sub

Private Sub Command3_Click()

'menghentikan program

If MsgBox("Are you sure to exit?", vbQuestion + vbOKCancel + vbCritical,

"Exit") = vbOK Then

End

Else

awal.Show

Page 9: Bab 3 ampun

End If

End Sub

Private Sub Command4_Click()

'memunculkan form2 dan menyembunyikan awal

awal.Hide

Form2.Show

End Sub

3.2.2. Coding Form 2

Adapun code yang ditulis pada jendela kode form 2 sebagai berikut:

Private Sub Command1_Click()

'memunculkan awal dan menyembunyikan form1

Form1.Hide

awal.Show

End Sub

3.2.3. Coding Form 3

Adapun code yang ditulis pada jendela kode form 3 sebagai berikut:

Private Sub Command1_Click()

'memunculkan awal dan menyembunyikan form2

Form2.Hide

awal.Show

End Sub

3.2.3. Coding Form 4

Adapun code yang ditulis pada jendela kode form 4 sebagai berikut:

Private Sub Command1_Click()

'menghitung nilai i'

Dim Rt, Et, N, PperF, FperA As Double

PperF = Val(Text5.Text)

Page 10: Bab 3 ampun

FperA = Val(Text4.Text)

Rt = Val(Text10.Text)

Et = Val(Text8.Text)

N = Val(Text2.Text)

Text12.Text = ((Rt * FperA) / (Et * PperF)) ^ (1 / N) - 1

End Sub

Private Sub Command2_Click()

Text8.Text = ""

Text10.Text = ""

Text2.Text = ""

Text12.Text = ""

End Sub

Private Sub Command3_Click()

Dim MARR As Double

MARR = Val(Text13.Text)

If Val(Text13) <= Val(Text12) Then

Text14.Text = "Layak"

Else

Text14.Text = "Tidak Layak"

End If

End Sub

Private Sub Command4_Click()

'mengosongkan nilai input

Text13.Text = ""

Text14.Text = ""

End Sub

Page 11: Bab 3 ampun

Private Sub Command5_Click()

'memunculkan awal dan menyembunyikan form3

awal.Show

form3.Hide

End Sub

Private Sub Command6_Click()

'menghitung nilai F/A

Dim e, Nkurangt As Double

e = Val(Text17.Text)

Nkurangt = Val(Text7.Text)

Text4.Text = ((1 + e) ^ Nkurangt - 1) / e

End Sub

Private Sub Command7_Click()

'mengosongkan nilai input

Text4.Text = ""

End Sub

Private Sub proses_Click()

'menghitung nilai P/F

Dim e, t As Double

e = Val(Text17.Text)

t = Val(Text18.Text)

Text5.Text = 1 / (1 + e) ^ t

End Sub

Private Sub reset_Click()

'mengosongkan nilai input

Text5.Text = ""

End Sub

Page 12: Bab 3 ampun

Private Sub Text10_KeyPress(KeyAscii As Integer)

'hanya dapat menginput jenis data numerik

Select Case KeyAscii

Case vbKey0 To vbKey9

Case vbKeyBack, vbKeyDelete

Case Else

KeyAscii = 0

End Select

End Sub

Private Sub Text13_KeyPress(KeyAscii As Integer)

'hanya dapat menginput jenis data numerik

Select Case KeyAscii

Case vbKey0 To vbKey9

Case vbKeyBack, vbKeyDelete

Case Else

KeyAscii = 0

End Select

End Sub

Private Sub Text16_KeyPress(KeyAscii As Integer)

'hanya dapat menginput jenis data numerik

Select Case KeyAscii

Case vbKey0 To vbKey9

Case vbKeyBack, vbKeyDelete

Case Else

KeyAscii = 0

End Select

End Sub

Page 13: Bab 3 ampun

Private Sub Text17_KeyPress(KeyAscii As Integer)

'hanya dapat menginput jenis data numerik

Select Case KeyAscii

Case vbKey0 To vbKey9

Case vbKeyBack, vbKeyDelete

Case Else

KeyAscii = 0

End Select

End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)

'hanya dapat menginput jenis data numerik

Select Case KeyAscii

Case vbKey0 To vbKey9

Case vbKeyBack, vbKeyDelete

Case Else

KeyAscii = 0

End Select

End Sub

Private Sub Text7_KeyPress(KeyAscii As Integer)

'hanya dapat menginput jenis data numerik

Select Case KeyAscii

Case vbKey0 To vbKey9

Case vbKeyBack, vbKeyDelete

Case Else

KeyAscii = 0

End Select

End Sub

Private Sub Text8_KeyPress(KeyAscii As Integer)

'hanya dapat menginput jenis data numerik

Page 14: Bab 3 ampun

Select Case KeyAscii

Case vbKey0 To vbKey9

Case vbKeyBack, vbKeyDelete

Case Else

KeyAscii = 0

End Select

End Sub

3.4. Tampilan Akhir Program

Adapun tampilan akhir dari Form 1 dapat dilihat pada Gambar 3.5.

Gambar 3.5. Tampilan Akhir Form 1

Page 15: Bab 3 ampun

Adapun tampilan akhir dari Form Teori dapat dilihat pada Gambar 3.6.

Gambar 3.6. Tampilan Akhir Form Teori

Adapun tampilan akhir dari Form About Us dapat dilihat pada Gambar 3.7.

Gambar 3.7. Tampilan Akhir Form About Us

Page 16: Bab 3 ampun

Adapun tampilan akhir dari Form Menghitung ERR dapat dilihat pada Gambar 3.8.

Gambar 3.8. Tampilan Akhir Form Menghitung ERR