NPM: 2310010029 NAMA: Muhammmad Ilqy Rahmatullah Kelas: 2E Reg Banjarmasin
NPM: 2310010029 NAMA: Muhammmad Ilqy Rahmatullah Kelas: 2E Reg Banjarmasin
2. Program Perkenalan
CODING
unit Login;
interface
uses
type
TFlogin = class(TForm)
Label1: TLabel;
Button1: TButton;
Button2: TButton;
email: TEdit;
epass: TEdit;
Label2: TLabel;
Label3: TLabel;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Flogin: TFlogin;
implementation
{$R *.dfm}
Konversi_Suhu, home_Pertemuan_2;
begin
begin
Flogin.Hide;
FHome.Show;
end
else
begin
email.Text := '';
epass.Text := '';
email.SetFocus;
end;
end;
close
end;
end.
3. Program kalkulatoer
CODING
unit Kalkulator;
interface
uses
Vcl.Imaging.jpeg;
type
TFkalkulator = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
t2: TEdit;
t1: TEdit;
t_tambah: TEdit;
t_bagi: TEdit;
t_kali: TEdit;
t_Kurang: TEdit;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Image1: TImage;
Button5: TButton;
blagi: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Fkalkulator: TFkalkulator;
implementation
{$R *.dfm}
begin
t1.Text :='0';
t2.Text :='0';
t_tambah.Text :='0';
t_kurang.Text :='0';
t_kali.Text :='0';
t_bagi.Text :='0';
end;
var
a,b,hasil : real;
begin
a := StrToFloat (t1.Text);
b := StrToFloat (t2.Text);
hasil := a + b;
t_tambah.Text := FloatToStr(hasil);
end;
var
a,b,hasil : real;
begin
a := StrToFloat (t1.Text);
b := StrToFloat (t2.Text);
hasil := a - b;
t_kurang.Text := FloatToStr(hasil);
end;
var
a,b,hasil : real;
begin
a := StrToFloat (t1.Text);
b := StrToFloat (t2.Text);
hasil := a * b;
t_kali.Text := FloatToStr(hasil);
end;
var
a,b,hasil : real;
begin
a := StrToFloat (t1.Text);
b := StrToFloat (t2.Text);
hasil := a / b;
t_bagi.Text := FloatToStr(hasil);
end;
begin
close;
end;
end.
4.Program Pembayaran
CODING
unit TokoSwalayan;
interface
uses
Vcl.ExtCtrls;
type
TFtoko = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Tk3: TEdit;
Button1: TButton;
Tk4: TEdit;
Tk2: TEdit;
Tk1: TEdit;
Button2: TButton;
Image1: TImage;
blagi: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Ftoko: TFtoko;
Implementation
{$R *.dfm}
uses home_Pertemuan_2;
begin
Tk1.Text :='';
Tk2.Text :='0';
Tk3.Text :='0';
Tk4.Text :='0';
end;
var
a,b,hasil : real;
begin
a := StrToFloat (Tk2.Text);
b := StrToFloat (Tk3.Text);
hasil := a * b;
end;
begin
end;
end.
CODING
unit Aplikasi_Gaji;
interface
uses
type
TFGaji = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
etetap: TRadioButton;
Rhonorer: TRadioButton;
enama: TEdit;
Cjabatan: TComboBox;
epokok: TEdit;
GroupBox1: TGroupBox;
etunjangan: TEdit;
Btotal: TButton;
Bclose: TButton;
Blagi: TButton;
Label5: TLabel;
ebersih: TEdit;
private
{ Private declarations }
public
{ Public declarations }
end;
var
FGaji: TFGaji;
implementation
{$R *.dfm}
begin
end;
begin
cjabatan.Text :='jabatan';
enama.Text :='';
ebersih.Text :='0';
etunjangan.Text :='0';
epokok.Text :='0';
etetap.Checked := false;
Rhonorer.Checked := false;
end;
var
a,b,c : real;
begin
a := StrToFloat (epokok.Text);
b := StrToFloat (etunjangan.Text);
c := a + b;
ebersih.Text := FloatToStr(c)
end;
begin
epokok.Text :='5000000'
else
epokok.Text :='2000000'
else
epokok.Text :='1000000'
else
epokok.Text :='0'
end;
begin
cjabatan.Items.Add('Direktur');
cjabatan.Items.Add('Manager');
cjabatan.Items.Add('Karyawan');
end;
var
a,hasil : real;
begin
a := StrToFloat (epokok.Text);
hasil := a*0.1;
etunjangan.Text := FloatToStr(hasil)
end;
var
a,hasil : real;
begin
a := StrToFloat (epokok.Text);
hasil := a*0.3;
etunjangan.Text := FloatToStr(hasil)
end;
end.
interface
uses
type
TFBiaya = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
eprak: TEdit;
ente: TEdit;
enprak: TEdit;
GroupBox1: TGroupBox;
Label6: TLabel;
Label7: TLabel;
emurni: TEdit;
cmi: TCheckBox;
ctk: TCheckBox;
Label8: TLabel;
Label9: TLabel;
ejm: TEdit;
ejt: TEdit;
GroupBox2: TGroupBox;
GroupBox3: TGroupBox;
Label10: TLabel;
ebw: TEdit;
btotal: TButton;
blagi: TButton;
bclose: TButton;
eujian: TEdit;
etb: TEdit;
egrade: TEdit;
epagi: TRadioButton;
esore: TRadioButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
FBiaya: TFBiaya;
implementation
{$R *.dfm}
begin
ejm.Text :='250000'
else
ejm.Text :='0'
end;
begin
close
end;
begin
egrade.Text :='';
eujian.Text :='0';
eprak.Text :='0';
ente.Text :='0';
enprak.Text :='0';
emurni.Text :='0';
ejm.Text :='0';
ejt.Text :='0';
ebw.Text :='0';
etb.Text :='0';
ctk.Checked := false;
cmi.Checked := false;
epagi.Checked := false;
esore.Checked := false;
end;
var
a, b, c, d : real;
begin
a := StrToFloat (ejm.Text);
b := StrToFloat (ejt.Text);
c := StrToFloat (ebw.Text);
d := a + b + c;
etb.Text := FloatToStr(d)
end;
begin
ejt.Text :='300000'
else
ejt.Text :='0'
end;
var
a, b, c : real;
nilai : integer;
ket : string;
begin
a := StrToFloat (ente.Text);
b := StrToFloat (enprak.Text);
c := a + b;
emurni.Text := FloatToStr(c);
begin
egrade.Text := 'lulus'
else
egrade.Text := 'Gagal'
end;
begin
else
ebw.Text :=''
end;
var
a,b : real;
begin
a := StrToFloat (eprak.Text);
b := a * 00.6;
enprak.Text := FloatToStr(b)
end;
begin
ebw.Text :='1000000'
else
ebw.Text :='0'
end;
var
a,b : real;
begin
a := StrToFloat (eujian.Text);
b := a * 00.4;
ente.Text := FloatToStr(b)
end;
end.
interface
uses
type
TFulang = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
eitem: TEdit;
etgl: TEdit;
enofaktur: TEdit;
cmdok: TButton;
GroupBox1: TGroupBox;
Inama: TListBox;
GroupBox2: TGroupBox;
Iharga: TListBox;
GroupBox3: TGroupBox;
Label4: TLabel;
etotal: TEdit;
cmdlagi: TButton;
cmdclose: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Fulang: TFulang;
Implementation
{$R *.dfm}
begin
close;
end;
begin
eitem.Text :='';
enofaktur.Text :='';
Inama.Clear;
Iharga.Clear;
etotal.Text :='';
end;
var
inputnama : string;
inputharga : string;
i : integer;
j : integer;
harga : real;
begin
harga :=0;
j :=0;
j:= strtoint(eitem.Text);
if j <= 0 then
begin
exit;
end
else
begin
for i := 1 to j do
begin
Inama.Items.Add(inputnama);
Iharga.Items.Add(inputharga);
end;
end;
etotal.Text := floattostr(harga);
end;
begin
FormatSettings.DateSeparator :='-';
FormatSettings.ShortDateFormat := 'mm/dd/yyyy';
end;
end.
8. Program Suhu
CODING
unit Konversi_Suhu;
interface
uses
type
TFsuhu = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
eawal: TEdit;
eakhir: TEdit;
enambah: TEdit;
GroupBox1: TGroupBox;
cmdok: TButton;
lcel: TListBox;
lfar: TListBox;
Label5: TLabel;
Label6: TLabel;
cmdclose: TButton;
GroupBox2: TGroupBox;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Fsuhu: TFsuhu;
implementation
{$R *.dfm}
begin
close
end;
begin
var
var x, y : string;
var z : real;
begin
lcel.Clear;
lfar.Clear;
Celcius := strtoint(eawal.Text);
Akhir := strtoint(eakhir.Text);
Nambah := strtoint(enambah.Text);
repeat
x := inttostr(Celcius);
z := (1.8*Celcius)+32;
y := floattostr(z);
lcel.Items.Add(x);
lfar.Items.Add(y);
until
end;
end;
end.
9. Biodata Diri