laporan program take home pay

Upload: mykey-elektromekanik-sttn

Post on 17-Jul-2015

93 views

Category:

Documents


0 download

TRANSCRIPT

LAPORAN PRAKTIKUM P. KOMPUTER DAN K. NUMERIK Materi : Take Home Pay

DISUSUN OLEH :

Nama NIM PRODI

: : :

Miki Arian Saputra 031000214 Elektromekanik 2010

SEKOLAH TINGGI TEKNOLOGI NUKLIR BADAN TENAGA NUKLIR NASIONAL 2012

Take Home PayI. Tujuan : Agar mahasiswa mampu mengoprasikan program Delphi 7, tahu kegunaan dari masing-masing propertis dan event yang digunakan, serta mahasiswa mampu menjalankan program dengan menggunakan conditional statement.

II. Permasalahan

III. Pengolahan Program a. Program Login Adminunit Unit1; interface uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, jpeg;

type TForm1 = class(TForm) Label1: TLabel; Label2: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel; Label8: TLabel; ComboBox1: TComboBox; Edit2: TEdit; Edit3: TEdit; Button1: TButton; Button2: TButton; Button3: TButton; Edit4: TEdit; Edit5: TEdit; Edit6: TEdit; Edit7: TEdit; ComboBox2: TComboBox; ComboBox3: TComboBox; Timer1: TTimer; Label3: TLabel; Timer2: TTimer; Image1: TImage; Label9: TLabel; Timer3: TTimer; procedure ComboBox3Change(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject);

procedure Timer1Timer(Sender: TObject); procedure ComboBox2Change(Sender: TObject); procedure ComboBox3Click(Sender: TObject); procedure ComboBox1Change(Sender: TObject); procedure Timer2Timer(Sender: TObject); procedure Timer3Timer(Sender: TObject); private { Private declarations } public { Public declarations } a,b,c,d,pajak,GaTot:real;

end;

var Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.ComboBox3Change(Sender: TObject); begin if ComboBox3.Text = 'Tidak Ada' then Edit7.Text := '0' else if ComboBox3.Text = '1' then Edit7.Text := '200000' else if ComboBox3.Text = '2' then Edit7.Text := '400000' else if ComboBox3.Text = '3 Atau Lebih' then Edit7.Text := '500000'

else Edit7.Text:='0' end;

procedure TForm1.Button1Click(Sender: TObject); begin a := strtofloat (Edit2.Text); b := strtofloat (Edit3.Text); c := strtofloat (Edit7.Text); d := a+b+c; Edit4.Text :=Floattostr(d); end;

procedure TForm1.Button2Click(Sender: TObject); begin pajak :=strtofloat(edit4.Text); if pajak >=2750000 then Edit5.Text:=FloatToStr(d*0.1) else if pajak >=2250000 then Edit5.Text:=FloatToStr(d*0.05) else if pajak < 2250000 then Edit5.Text:=FloatToStr(0); end;

procedure TForm1.Button3Click(Sender: TObject); begin GaTot :=strtofloat(edit4.Text); pajak :=strtofloat(edit5.Text);

Edit6.Text:='Rp. '+FloatToStr(GaTot-pajak) end;

procedure TForm1.Timer1Timer(Sender: TObject); begin if Label1.visible=true then label1.visible:=false else label1.visible:=true;

end;

procedure TForm1.ComboBox2Change(Sender: TObject); begin if ComboBox2.Text = '>5 Tahun' then Edit3.Text := '500000' else if ComboBox2.Text = '