• Tidak ada hasil yang ditemukan

Sistem Pakar Diagnosa Kanker Payudara Menggunakan Metode Certainty Factor Berbasis Android

N/A
N/A
Protected

Academic year: 2017

Membagikan "Sistem Pakar Diagnosa Kanker Payudara Menggunakan Metode Certainty Factor Berbasis Android"

Copied!
15
0
0

Teks penuh

(1)

Listing Program

Main.xml

<?xml version="1.0" encoding="utf-8"?> <AbsoluteLayout

xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"

android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/awal">

<Button

android:layout_height="wrap_content" android:layout_width="wrap_content" android:background="@drawable/x1" android:id="@+id/BtnRegister" android:layout_x="75dip" android:layout_y="320dip"/>

<Button

android:layout_height="wrap_content" android:layout_width="wrap_content" android:background="@drawable/x2" android:id="@+id/BtnAbout"

android:layout_x="172dip" android:layout_y="320dip"/> </AbsoluteLayout>

About.xml

<?xml version="1.0" encoding="utf-8"?> <TableLayout

xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent"

android:layout_height="wrap_content" android:background="@drawable/y" android:stretchColumns="1">

<TableLayout>

<TableRow> <TextView android:text=" " android:layout_weight="1" ></TextView> </TableRow>

<TextView

android:text=" Info Pakar" android:id="@+id/Text01" android:textColor="#ff800000" android:textStyle="bold" android:textSize="18px"

android:layout_width="wrap_content" android:layout_height="wrap_content"

android:layout_gravity="center_vertical"></TextView> </TableLayout>

<TableRow> <TextView

(2)

android:id="@+id/Text01" android:textColor="#111111" android:textStyle="bold" android:textSize="12px"

android:layout_width="wrap_content" android:layout_height="wrap_content"> </TextView>

<TextView

android:text=": Dr. Suyatno SpB(K)Onk" android:id="@+id/Text01"

android:textColor="#111111" android:textStyle="bold" android:textSize="12px"

android:layout_width="wrap_content" android:layout_height="wrap_content"> </TextView>

</TableRow> <TextView

android:text=" Info Dosen Pembimbing" android:id="@+id/Text01"

android:textColor="#ff800000" android:textStyle="bold"

android:text=" Pembimbing I" android:id="@+id/Text01" android:textColor="#111111" android:textStyle="bold" android:textSize="12px"

android:layout_width="wrap_content" android:layout_height="wrap_content"> </TextView>

</TableRow> <TableRow>

<TextView

android:text=": Dr. Poltak Sihombing, M.Kom" android:id="@+id/Text01"

android:textColor="#111111" android:textStyle="bold" android:textSize="12px"

android:layout_width="wrap_content" android:layout_height="wrap_content"> </TextView>

</TableRow> <TableRow>

<TextView

android:text=" Pembimbing II" android:id="@+id/Text01"

android:textColor="#111111" android:textStyle="bold" android:textSize="12px"

(3)

</TableRow> <TableRow>

<TextView

android:text=": Amer Sharif, S.Si, M.Kom" android:id="@+id/Text01"

android:textColor="#111111" android:textStyle="bold" android:textSize="12px"

android:layout_width="wrap_content"

android:layout_height="wrap_content"> </TextView> </TableRow>

<TableLayout> <TableRow>

<TextView

android:text=" Info Programmer" android:id="@+id/Text01"

android:textColor="#ff800000" android:textStyle="bold" android:textSize="18px"

android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical"> </TextView>

</TableRow> </TableLayout>

<TableRow>

<TextView

android:text=": Dhita Pratiwi" android:id="@+id/Text01"

android:textColor="#111111" android:textStyle="bold" android:textSize="12px"

android:layout_width="wrap_content" android:layout_height="wrap_content"> </TextView>

</TableRow> </TableLayout>

Help.xml

<?xml version="1.0" encoding="utf-8"?> <ScrollView

xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"

android:layout_width="fill_parent" android:layout_height="fill_parent"

android:background="@drawable/y">

<TableLayout

xmlns:android=" http://schemas.android.com/apk/res/android" android:layout_width="fill_parent"

android:layout_height="wrap_content" android:stretchColumns="1">

(4)

android:text="Cara Menggunakan Aplikasi Sistem Pakar Kanker Payudara"

android:id="@+id/Text01" android:textColor="#ff800000" android:textStyle="bold" android:textSize="15px"

android:layout_width="wrap_content" android:layout_height="wrap_content"

android:layout_gravity="center"></TextView>

<TableRow>

<TextView android:text=" 1. Instal KankerPayudara.apk pada Hp Android"

android:id="@+id/Text03"

android:textColor="#000000"/></TableRow>

<TableLayout> <Button

android:layout_height="wrap_content" android:layout_width="wrap_content" android:background="@drawable/x8" android:id="@+id/BtnBack"

android:layout_x="400dip" android:layout_y="5dip"/> </TableLayout>

</TableLayout> </TableLayout> </ScrollView>

Info.xml

<?xml version="1.0" encoding="utf-8"?> <ScrollView

xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"

android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/bg" android:stretchColumns="1">

<TextView

android:layout_width="match_parent" android:layout_height="match_parent" android:textColor="#aa0000"

android:textStyle="bold"

android:text="INFO KANKER PAYUDARA" android:gravity="center"/>

<ImageView

android:id="@+id/iminfo_pakar" android:background="@drawable/p0" android:layout_height="wrap_content" android:layout_width="wrap_content"/>

<TextView

android:text="

(5)

Sel-sel tersebut merupakan hasil mutasi gen dengan perubahan-perubahan bentuk, ukuran maupun fungsinya."

android:textColor="#000000"

android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView

android:layout_width="match_parent" android:layout_height="match_parent" android:textColor="#aa0000"

android:textStyle="bold"

android:text="Gambar Gejala Kanker Payudara" android:gravity="center"/>

<TableLayout> <TableRow> <Button

android:background="@drawable/x8" android:id="@+id/BtnBack"

android:layout_width="100px"

android:layout_height="wrap_content"/> <TextView

android:text=""

android:layout_weight="1"/> </TableRow>

</TableLayout> </TableLayout> </ScrollView>

Register.xml

<?xml version="1.0" encoding="utf-8"?> <TableLayout

xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent"

android:layout_height="wrap_content" android:background="@drawable/y" android:stretchColumns="1">

<TableLayout> <TableRow>

<TextView android:text=" " android:layout_weight="1" ></TextView> <TextView

android:text="Register" android:id="@+id/Text01" android:textColor="#ff800000" android:textStyle="bold" android:textSize="20px"

android:layout_width="wrap_content" android:layout_height="wrap_content"

android:layout_gravity="center_vertical"></TextView> </TableRow>

</TableLayout> <TableRow> <TextView

android:text=" "

android:layout_weight="1" ></TextView> </TableRow> <TableRow>

<TextView android:text=" Nama:" android:id="@+id/Text03"

(6)

android:textStyle="bold"/>

<EditText android:id="@+id/txtNama" android:textColor="#000000"

android:textStyle="bold"/> </TableRow>

<TableLayout> <TableRow>

<Button

android:layout_height="wrap_content" android:layout_width="wrap_content" android:background="@drawable/x6" android:id="@+id/BtnCekGejala"

android:layout_gravity="center_horizontal"/> <Button

android:layout_height="wrap_content" android:layout_width="wrap_content" android:background="@drawable/x5" android:id="@+id/BtnCancel"

android:layout_gravity="center_horizontal"/> </TableLayout>

</TableLayout>

Gejala.xml

<?xml version="1.0" encoding="UTF-8"?> <ScrollView

xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"

android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/y">

<TableRow> <TextView

android:text=" Ada benjolan dipayudara anda?" android:textColor="#000000"

android:textStyle="bold"/> </TableRow>

<TableRow>

<RadioGroup android:id="@+id/aa"> <RadioButton

android:text="Ya"

android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/ya01"

android:checked="true" /> <RadioButton

android:id="@+id/tidak01" android:text="Tidak"/> </RadioGroup>

</TableRow> <Button

android:id="@+id/BtnDiagnosa" android:layout_height="40dip" android:layout_width="70dip" android:background="@drawable/x7"

android:layout_gravity="center_horizontal"/> </TableLayout>

(7)

Hasil.xml

<?xml version="1.0" encoding="utf-8"?> <AbsoluteLayout

xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"

android:layout_width="fill_parent" android:layout_height="fill_parent"

android:background="@drawable/y"> <Button

android:layout_height="wrap_content" android:layout_width="wrap_content" android:background="@drawable/ex" android:textColor="#000000"

android:textStyle="bold" android:id="@+id/BtnExit" android:layout_x="295dip" android:layout_y="2dip"/> <TableLayout

xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent"

android:layout_height="wrap_content" android:stretchColumns="1">

<TextView android:text=" Hasil Diagnosis" android:id="@+id/Text01"

android:textColor="#ff800000" android:textStyle="bold" android:textSize="20px"

android:layout_gravity="center_vertical"></TextView> </TableLayout>

<TableRow>

<TextView android:text=" Berdasarkan Gejala yang telah dipilih, Maka Anda kemungkinan Terdiagnosa = KANKER PAYUDARA " android:id="@+id/Text01"

android:textColor="#0000ff" android:textStyle="bold" android:textSize="12px"

android:layout_width="wrap_content"

android:layout_height="wrap_content"> </TextView> </TableRow>

<TableRow>

<TextView android:text=" Dengan Nilai CF= % " android:id="@+id/TextCF"

android:textColor="#0000ff" android:textStyle="bold" android:textSize="12px"

android:layout_width="wrap_content"

android:layout_height="wrap_content"> </TextView> </TableRow>

<TextView

android:text=" Solusi Penyembuhan" android:id="@+id/TextSolusi" android:textColor="#ff800000" android:textStyle="bold" android:textSize="20px"

android:layout_width="wrap_content"

(8)

<TableRow>

<TextView android:text=" 1. Lakukan Pemeriksaan Fisik" android:id="@+id/Text01"

android:textColor="#111111" android:textStyle="bold" android:textSize="12px"

android:layout_width="wrap_content"

android:layout_height="wrap_content"> </TextView> </TableRow>

</TableLayout> </AbsoluteLayout>

KankerPayudara.java

package Kanker.Payudara; import android.app.Activity; import android.content.Intent;

import android.content.SharedPreferences; import android.os.Bundle;

import android.view.View;

import android.view.View.OnClickListener; import android.widget.Button;

public class KankerPayudara extends Activity {

/** Called when the activity is first created. */

public static final String PREFS_NAME = "FILE_SETTING";

@Override

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

setContentView(R.layout.main);

Button btnRegister = (Button) findViewById(R.id.BtnRegister); Button btnAbout = (Button) findViewById(R.id.BtnAbout); Button btnInfo = (Button) findViewById(R.id.BtnInfo); Button btnHelp = (Button) findViewById(R.id.BtnHelp);

btnRegister.setOnClickListener(new OnClickListener() { public void onClick(View v) {

// TODO Auto-generated method stub Intent intentRegister = new

Intent(KankerPayudara.this,Register.class); startActivity(intentRegister);

}

});

btnAbout.setOnClickListener(new OnClickListener() { public void onClick(View v) {

// TODO Auto-generated method stub Intent intentAbout = new

Intent(KankerPayudara.this,About.class); startActivity(intentAbout);

}

});

(9)

Register.java

package Kanker.Payudara; import android.app.Activity; import android.content.Intent;

import android.content.SharedPreferences; import android.os.Bundle;

import android.view.View;

import android.view.View.OnClickListener; import android.widget.Button;

public class Register extends Activity {

public static final String PREFS_NAME = "MyPreferencesFile"; /** Called when the activity is first created. */

EditText nama , umur , alamat; @Override

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

setContentView(R.layout.register);

Button btnCekGejala = (Button) findViewById(R.id.BtnCekGejala);

Button btnCancel = (Button) findViewById(R.id.BtnCancel);

btnCancel.setOnClickListener(new OnClickListener() { public void onClick(View v) {

// TODO Auto-generated method stub Intent intentBack = new

Intent(Register.this,KankerPayudara.class); startActivity(intentBack);

} });

btnCekGejala.setOnClickListener(new OnClickListener() { public void onClick(View v) {

// TODO Auto-generated method stub

umur = (EditText)findViewById(R.id.txtUmur);

nama = (EditText)findViewById(R.id.txtNama); alamat = (EditText)findViewById(R.id.txtAlamat);

int umr = Integer.parseInt(umur.getText().toString());

if(umr<11){

Toast.makeText(getApplicationContext(), "Aplikasi Di Buat Untuk Usia 12 Tahun Ke Atas" , Toast.LENGTH_SHORT).show();

} else{

SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);

SharedPreferences.Editor editor = settings.edit();

editor.putString("nama", nama.getText().toString()); editor.putString("umur", umur.getText().toString()); editor.putString("alamat", alamat.getText().toString());

(10)

Intent intentGejala = new Intent(Register.this,Gejala.class); startActivity(intentGejala); }

} });

} }

Gejala.java

package Kanker.Payudara;

import java.text.DecimalFormat; import android.app.Activity; import android.content.Intent;

import android.content.SharedPreferences; import android.os.Bundle;

import android.view.View;

import android.view.View.OnClickListener; import android.widget.Button;

import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.TextView; import android.widget.Toast;

public class Gejala extends Activity {

public static final String PREFS_NAME = "FILE_SETTING"; /** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

setContentView(R.layout.gejala);

Button btnDiagnosa = (Button) findViewById(R.id.BtnDiagnosa);

btnDiagnosa.setOnClickListener(new OnClickListener() { public void onClick(View v) {

// TODO Auto-generated method stub

//ambil id radio group untuk pertanyaan 1 sampai 18 RadioGroup[] rg = new RadioGroup[18];

rg[0] = (RadioGroup)findViewById(R.id.aa); rg[1] = (RadioGroup)findViewById(R.id.bb); rg[2] = (RadioGroup)findViewById(R.id.cc);

// cek radio button mana yang di pilih dari radio group pertanyaan 1

int[] s = new int[18];

RadioButton[] rb = new RadioButton[18]; String[] textArray = new String[18];

// 1 untuk ya, 0 untuk tidak int[] x = new int[18];

for(int i = 0; i < 18; i++){

s[i] = rg[i].getCheckedRadioButtonId();

// ambil data tulisan dari radio button yang di pilih rb[i] = (RadioButton)findViewById(s[i]);

(11)

textArray[i] = rb[i].getText().toString();

// jadikan 0 atau 1, simpan ke dalam x if(textArray[i].equals("Ya"))

x[i] = 1;

else

x[i] = 0;

}

// Konstanta CF (sesuai dengan data di proposal) double[] CF = {

0.4, 0.4, 0.4, 0.3, 0.3,

0.4, 0.4, 0.4, 0.5, 0.6,

0.7, 0.4, 0.3, 0.3, 0.3,

0.4, 0.9, 0.9

};

double CFcombine = 0;

// iterasi untuk setiap gejala, perhitungan CFcombine // analisis certainty factor

for(int i = 0; i < 17; i++){

// perhitungan pertama ketika index = 0 if(i == 0){

CFcombine = (double)(CF[0] * x[0]) + (double)((CF[1] * x[1]) * (1 - CF[0] * x[0])

);

} else {

CFcombine = (double)(CF[i+1] * x[i+1]) + (double)(CFcombine * (1 - CF[i+1] * x[i+1])

); }}

// pindahkan data ke file shared preferences FILE_SETTING SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);

SharedPreferences.Editor editor = settings.edit();

for(int i = 0; i < 18; i++){

editor.putString("p"+(i+1), textArray[i]); }

//---

editor.commit();

//Toast.makeText(Gejala.this, j1, Toast.LENGTH_SHORT); Intent intentBack = new Intent(Gejala.this,Hasil.class); // kirimkan data CF ke activity baru

intentBack.putExtra("CF", String.valueOf(CFcombine)); startActivity(intentBack);

}

(12)

Hasil.java

package Kanker.Payudara; import java.math.BigDecimal; import android.app.Activity; import android.content.Intent;

import android.content.SharedPreferences; import android.os.Bundle;

import android.view.View;

import android.view.View.OnClickListener; import android.widget.Button;

import android.widget.TextView;

public class Hasil extends Activity {

public static final String PREFS_NAME = "MyPreferencesFile";

//Deklarasi Text View

TextView tv1, nama, umur, alamat, t1, t2, t3, t4, tsolusi;

/** Called when the activity is first created. */ @Override

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

setContentView(R.layout.hasil);

t1 = (TextView)findViewById(R.id.Text015); t2 = (TextView)findViewById(R.id.Text016); t3 = (TextView)findViewById(R.id.Text017); t4 = (TextView)findViewById(R.id.Text018);

nama = (TextView)findViewById(R.id.Text011); umur = (TextView)findViewById(R.id.Text012); alamat = (TextView)findViewById(R.id.Text013);

tsolusi = (TextView)findViewById(R.id.TextSolusi);

//set nama umur alamat

SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);

nama.setText("Nama : " + (settings.getString("nama", null)));

umur.setText("Umur : " + (settings.getString("umur", null)));

alamat.setText("Alamat : " + (settings.getString("alamat", null)));

// ambil intent/objek yang dikirim dari activity sebelumnya Intent sender=getIntent();

// ambil string cf yang dikirim

String cfString=sender.getExtras().getString("CF"); // atur nilai CF dari hasil perhitungan

float ncf = Float.parseFloat(cfString); float p_ncf = ncf * 100;

String pbk=Float.toString(p_ncf);

double nilai = Double.parseDouble(pbk);

String pbs = ss(String.valueOf(bulat(nilai)));

(13)

t1.setText(""); t2.setText(""); t3.setText(""); t4.setText("");

tsolusi.setText("Anda Tidak Terdiagnosa Kanker Payudara"); }

else if(nilai > 61){

tsolusi.setText("Kemungkinan Anda Terdiagnosa Kanker Payudara \n Solusinya Adalah");

}

TextView textViewToChange = (TextView) findViewById(R.id.TextCF);

textViewToChange.setText(

"Dengan nilai CF = " + String.valueOf(p_ncf) + "%");

Button btnBack = (Button) findViewById(R.id.BtnBack);

btnBack.setOnClickListener(new OnClickListener() { public void onClick(View v) {

// TODO Auto-generated method stub Intent intentBack = new

Intent(Hasil.this,KankerPayudara.class); startActivity(intentBack);

}

});

}}

About.java

package Kanker.Payudara; import android.app.Activity; mport android.content.Intent; import android.os.Bundle; import android.view.View;

import android.view.View.OnClickListener; import android.widget.Button;

public class About extends Activity {

/** Called when the activity is first created. */ @Override

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

setContentView(R.layout.about);

Button btnBack = (Button) findViewById(R.id.BtnBack);

btnBack.setOnClickListener(new OnClickListener() { public void onClick(View v) {

// TODO Auto-generated method stub Intent intentBack = new

Intent(About.this,KankerPayudara.class); startActivity(intentBack);

}

});

(14)

Help.java

package Kanker.Payudara; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View;

import android.view.View.OnClickListener; import android.widget.Button;

public class Help extends Activity {

/** Called when the activity is first created. */ @Override

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

setContentView(R.layout.help);

Button btnBack = (Button) findViewById(R.id.BtnBack);

btnBack.setOnClickListener(new OnClickListener() { public void onClick(View v) {

// TODO Auto-generated method stub Intent intentBack = new

Intent(Help.this,KankerPayudara.class); startActivity(intentBack);

}

});

}}

Info.java

package Kanker.Payudara;

import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View;

import android.view.View.OnClickListener; import android.widget.Button;

public class Info extends Activity {

/** Called when the activity is first created. */ @Override

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

setContentView(R.layout.info);

Button btnBack = (Button) findViewById(R.id.BtnBack);

btnBack.setOnClickListener(new OnClickListener() { public void onClick(View v) {

// TODO Auto-generated method stub Intent intentBack = new

Intent(Info.this,KankerPayudara.class); startActivity(intentBack);

}

});

(15)

DAFTAR RIWAYAT HIDUP

Nama

: Dhita Pratiwi

Alamat

: Jln. Paku No. 56 Link III Tanah Enam Ratus Marelan

Tanggal Lahir

: Medan 26 Juli 1992

Jenis Kelamin

: Perempuan

No Handphone

: 085270222700

Email

: dhita.pratiwi26@gmail.com

Pendidikan Formal

2013

2015

: S1 Ilmu Komputer Universitas Sumatera Utara

2010

2013

: DIII Teknik Informatika Universitas Sumatera Utara

2007

2010

: SMA Hang Tuah Belawan

2004

2007

: SMP Hang Tuah I Belawan

1998

2004

: SD Muhammadiyah 04 Belawan

Keahlian

Referensi

Dokumen terkait

Hasil analisis uji Partial Adjustment Model (PAM) menunjukan bahwa variabel PDB dan Inflansi berpengaruh signifikan dalam jangka pendek maupun jangka panjang

Metode penelitian menggunakan beberapa uji laboratorium untuk mengetahui tingkat stabilisasi tanah ekspansif asli dengan tanah ekspansif yang sudah dicampur dengan

Berdasarkan pendapat di atas, dapat diketahui bahwa fungsi dari Public Relations adalah membina hubungan yang harmonis, baik itu dengan publik intern maupun publik ekstern

Dari proses simulasi yang telah dilakukan maka dapat disimpulkan bahwa model dengan baffle utuh memiliki tekanan terkecil dengan mengurangi tekanan sebesar 19,2%,

[r]

Trakindo Utama Cabang Medan, produksi akan meningkat apabila seluruh personalia mampu dan mempunyai pemahaman terhadap desain pekerjaan yang dapat menciptakan kepuasan

Praktik Pengalaman Lapangan (PPL) adalah kegiatan kurikuler yang harus dilakukan oleh mahasiswa praktikan sebagai pelatihan untuk menerapkan teori yang diperoleh

Puji dan syukur Penulis ke hadirat Tuhan Yang Maha Esa karena berkat dan rahmatNya, Penulis dapat menyelesaikan laporan Skripsi dengan judul “Pengaruh Suhu dan Durasi