Implementasi Algoritma Pecocokan String Colussi Pada Aplikasi Kamus Biologi Berbasis Android

A-1
LISTING PROGRAM

Main.bas
#Region Project Attributes
#ApplicationLabel: Kamus Biologi
#VersionCode: 1
#VersionName: Dian
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: True
#IncludeTitle: False
#End Region
Sub Process_Globals
Dim Time As Timer
End Sub
Sub Globals
Dim Delay = 0 As Int
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Animasi")
Time.Initialize("TIB", 1000)
Time.Enabled = True
End Sub
Sub TIB_Tick
Delay = Delay + 1
If Delay > 2 Then
StartActivity(home)
Time.Enabled = False
Activity.Finish
End If
End Sub

Bantuan_act & Tentang_act.bas
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals

End Sub

Universitas Sumatera Utara

A-2
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("bantuan")
Activity.Title = "Kamus Biologi"
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub

home.bas
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True

#End Region
Sub Process_Globals
Public S As SQL
Public C As Cursor
Public algo As FS
Public din, Tabel As String
End Sub
Sub Globals
Private th1 As TabHost
Private ImageView2 As ImageView
Private ImageView1 As ImageView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("halaman_utama")
din = CopyDBFromAssets("db_biologi.db")
S.Initialize(din, "db_biologi.db", True)
Tabel = "File"
'Menu
Activity.Title = "Kamus Biologi"
Activity.AddMenuItem("Bantuan", "bantuan")

Activity.AddMenuItem("Tentang", "tentang")
Activity.AddMenuItem("Keluar", "keluar")
th1.AddTab("Bio - Indo", "bi.bal")
th1.AddTab("Indo - Bio", "in.bal")

Universitas Sumatera Utara

A-3
End Sub
Sub bantuan_Click
StartActivity (bantuan_act)
End Sub
Sub keluar_Click
Dim hasil As Int
hasil
=
Msgbox2("ANDA
INGIN
?","Konfirmasi","Iya","","Tidak",Null)
If hasil = DialogResponse.POSITIVE Then

ExitApplication
End If
End Sub

KELUAR

Sub tentang_Click
StartActivity (tentang_act)
End Sub
Sub Activity_Resume
If S.IsInitialized = False Then
S.Initialize(din, "db_biologi.db", True)
End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub ImageView1_Click
StartActivity (indonesia_act)
End Sub
Sub ImageView2_Click

StartActivity (biologi_act)
End Sub

Biologi & indonesia.bas
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
End Sub
Sub
Dim
Dim
Dim

Globals

DI(400) As String
DB(400) As String
LI, LB As List

Universitas Sumatera Utara

A-4
Private List_bio As ListView
Private Edit_txt_bio As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("biologi")
Activity.Title = "Kamus Biologi"
Activity.AddMenuItem3("Refresh", "refresh",
LoadBitmap(File.DirAssets, "baru.png"), True)
LI.Initialize : LB.Initialize
Ambil_Data
End Sub
Sub Activity_Resume
End Sub

Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Edit_txt_bio_EnterPressed
If Edit_txt_bio.Text "" Then
Cari_Data (Edit_txt_bio.Text)
End If
End Sub
Sub Cari_Data(Istilah As String)'
Dim hasil As Int
Dim T1 As Long = DateTime.Now
Dim jumlahhasil As Int = 0
List_bio.Clear : LI.Clear : LB.Clear
For i=0 To DI.Length-1 Step 1
hasil = home.algo.COLUSSI(DB(i), Istilah.ToUpperCase)
If hasil >= 0 Then
Msgbox ("jumlah Data yang ditemukan : " & hasil & CRLF &
"Waktu pencarian = " & ((DateTime.Now - T1) / 1000) & " Detik", ".:Pesan")
jumlahhasil = jumlahhasil + 1
List_bio.AddTwoLines(DB(i), DI(i))
LI.Add(DI(i))

LB.Add(DB(i))
End If
Next
Msgbox ("jumlah Data yang ditemukan : " & jumlahhasil & CRLF &
"Waktu pencarian = " & ((DateTime.Now - T1) / 1000) & " Detik", ".:Pesan")
End Sub
Sub refresh_Click
ProgressDialogShow2("Load Data", False)
Tabel = "Data" : Activity.Title = "Kamus Biologi"
Ambil_Data
Edit_txt_bio.Text = "" : Edit_txt_bio.RequestFocus
ProgressDialogHide
End Sub
Sub Ambil_Data
home.C = home.S.ExecQuery("SELECT * FROM kamus_biologi ORDER BY
Biologi ASC")

Universitas Sumatera Utara

A-5

List_bio.Clear
If home.C.RowCount > 0 Then
For I = 0 To home.C.RowCount - 1
home.C.Position = I
List_bio.AddTwoLines(home.C.GetString("Biologi"),
home.C.GetString("Indonesia"))
DI(I) = home.C.GetString("Indonesia").ToUpperCase
DB(I) = home.C.GetString("Biologi").ToUpperCase
Next
End If
End Sub
Sub List_bio_ItemClick (Position As Int, Value As Object)
Msgbox("Biologi " & TAB & "=" & LB.Get(Position) & CRLF & "Indonesia
" & TAB & "=" & LI.Get(Position), "Detail")
End Sub

ALGORITMA
import anywheresoftware.b4a.BA.ShortName;
@ShortName ("algo")
public class algo {

static String txt;
static String pat;
static char[] x;
static char[] y;
static int n;
static int m;
static
static
static
static
static
static
static

int[]
int[]
int[]
int[]
int[]
int[]
int[]

hmax = new int[256];
kmin = new int[256];
nhd0 = new int[256];
rmin = new int[256];
h = new int[256];
next = new int[256];
shift = new int[256];

public static void main(String[] args) {
}

public static int preColussi() {
int i, k, nd, q, r = 0, s;
/* Computation of hmax */
i = k = 1;
do {
try {
while (x[i] == x[i - k])
i++;
} catch (Exception e) {
}
hmax[k] = i;
q = k + 1;
while (hmax[q - k] + k < i) {
hmax[q] = hmax[q - k] + k;
q++;

Universitas Sumatera Utara

A-6
}
k = q;
if (k == i + 1)
i = k;
} while (k = 1; --i)
if (hmax[i] < m)
kmin[hmax[i]] = i;
/* Computation of rmin */
for (i = m - 1; i >= 0; --i) {
if (hmax[i + 1] == m)
r = i + 1;
if (kmin[i] == 0)
rmin[i] = r;
else
rmin[i] = 0;
}
/* Computation of h */
s = -1;
r = m;
for (i = 0; i < m; ++i)
if (kmin[i] == 0)
h[--r] = i;
else
h[++s] = i;
nd = s;
/* Computation of shift */
for (i = 0; i 0)
++s;
}
/* Computation of next */
for (i = 0; i = j + h[i]) {
//System.out.println("Hasil = " + j);
return j;
i = m;
}
if (i > nd)
last = j + m - 1;
j += shift[i];
i = next[i];
}
return nd;
}}

Universitas Sumatera Utara

B-1

CURRICULUM VITAE
Nama Lengkap
Nama Panggilan
Tempat/Tanggal Lahir
Jenis Kelamin
Agama
Warga Negara
Alamat
Mobile Phone
E-mail

: Dian Sartini
: Dian
: Medan / 9 Januari 1994
: Wanita
: Islam
: Indonesia
: Jl. Titi – kuning, Deli – tua
: 082276638583
: diannsartiny@gmail.com

PENDIDIKAN
Perguruan Tinggi
Universitas Sumatera Utara
Fakultas Ilmu Komputer dan Teknologi Informasi
Program Studi S1 Ilmu Komputer
IPK 3.46
2012 – 2016
Sekolah Menengah Atas
MAS Tadib Al – Muallimin Al - Islamiy
2009-2012
Sekolah Menengah Pertama
MTS Saifullah
2006-2009
Sekolah Dasar
SDN 102417
2000-2006
KEMAMPUAN KOMPUTER
Programming: C++, Vb, HTML
Database
: MySQL
IDE
: Microsoft Visual Studio 2006
Software
: Ms. Office

PENGALAMAN PELATIHAN

Universitas Sumatera Utara

B-2
No.
1
2

Tahun
2012
2013

Pelatihan
Training Islami Ceria dan Kreatif (TRICK)
Training Pengurus

PENGALAMAN ORGANISASI/KEPANITIAAN
No
1
2
3
4
5
6

Organisasi
UKMI Al-Khuwarizmi
UKMI Al-Khuwarizmi
UKMI Al-Khuwarizmi
UKMI Al-Khuwarizmi
PMB IMILKOM
UKMI Al-Khuwarizmi

Jabatan
Anggota Bidang Kaderisasi
Panitia TRICK IX
Sekretaris Divisi Kaderisasi
Bendahara Panitia TRICK IX
Anggota Konsumsi
Panitia AFEST

Tahun
2012-2013
2013
2013-2014
2014
2014
2014

SEMINAR
No.
1

Seminar

Tahun

Seminar Motivasi dan Prestasi

2012

2
3

Seminar “What Will You Be”

2013

4

Seminar Nasional Gelora Literasi Teknologi Informasi &
Komunikasi “Si GELITIK”
Seminar Nasional Literasi Informasi “SENARAI”

5
6

Seminar Nasional ILP2MI “Pengenalan Kebudayaan Sumatra Utara”

2013
2013
2014

International Youth Convention on the theme “Young People of CharacterThe Hope of The Future”

2014

PRESTASI
No.
1
2
3

Prestasi

Peserta terbaik putri dalam acara TRICK VIII
Peserta terbaik putri dalam acara TRAP VIII
Juara III Lomba Menghafal Al-Quran tingkat Se-Universitas (USU)

Tahun
2012
2012
2013

Demikian riwayat hidup ini saya perbuat dengan sebenar-benarnya.
Medan, 24 Juni 2016

Dian Sartini

Universitas Sumatera Utara