Membuat
Aplikasi penginputan Nilai Mahasiswa
Pada Pembuatan program Aplikasi Nilai Siswa. program ini
sebagai hasil dari Ujian Tengah Semester Mata Kuliah Pemrograman Delphi 1 yang
di lakukan pada hari Kamis 10 April 2014 ,Sarana aplikasi bahasa pemograman
yang di pakai di sini adalah bahasa pemograman Delphi 7
Hasil
1.
Form1
(Data Siswa)
·
Tampilan
:
·
Daftar
komponen pada Form1 (Data Siswa)
Komponen
|
Properti
|
Nilai
Dari Properti
|
Label1
|
Name
|
Label1
|
|
Caption
|
Data
Siswa
|
Label3
|
Name
|
Label3
|
|
Caption
|
No
Induk
|
Label4
|
Name
|
Label4
|
|
Caption
|
Nama
Siswa
|
Label5
|
Name
|
Label5
|
|
Caption
|
Nilai
MID
|
Label6
|
Name
|
Label6
|
|
Caption
|
Nilai
UTS
|
Label7
|
Name
|
Label7
|
|
Caption
|
Nilai
UAS
|
Label8
|
Name
|
Label4
|
|
Caption
|
Nilai
Tugas
|
Edit1
|
Name
|
Kosongkan
|
Edit2
|
Name
|
Kosongkan
|
Edit3
|
Name
|
Kosongkan
|
Edit4
|
Name
|
Kosongkan
|
Edit5
|
Name
|
Kosongkan
|
Edit6
|
Name
|
Kosongkan
|
Button1
|
Name
|
Button1
|
|
Caption
|
Proses
|
Button2
|
Name
|
Button2
|
|
Caption
|
Menu
|
Button3
|
Name
|
Button3
|
|
Caption
|
Baru
|
Group
Box
|
Name
|
GroupBox1
|
|
Caption
|
Kolom
Nilai
|
·
Listing
Program (syntax) pada Form1 (Data Siswa)
unit UTS;
interface
uses
Windows,
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,
StdCtrls, jpeg, ExtCtrls;
type
TForm1 =
class(TForm)
Label1:
TLabel;
Button1:
TButton;
Label3:
TLabel;
Label4:
TLabel;
GroupBox1: TGroupBox;
Label5:
TLabel;
Label6:
TLabel;
Label7:
TLabel;
Label8: TLabel;
Edit1:
TEdit;
Edit2:
TEdit;
Edit3:
TEdit;
Edit4:
TEdit;
Edit5:
TEdit;
Edit6:
TEdit;
Button2:
TButton;
Image1:
TImage;
Button3:
TButton;
Edit5:
TEdit;
Edit6:
TEdit;
Button2:
TButton;
Image1:
TImage;
Button3:
TButton;
procedure
Button1Click(Sender: TObject);
procedure
Button2Click(Sender: TObject);
procedure
Button3Click(Sender: TObject);
private
{ Private
declarations }
public
{ Public
declarations }
end;
var
Form1:
TForm1;
nim,nama,grade:string;
TUGAS,MID,NUTS,UAS:real;
NA:real;
implementation
uses hasil_nilai, Menu;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
form2.show;
form2.Edit2.Text:=edit2.Text;
nim:=edit1.Text;
if nim =
'111' then
Edit2.Text:= 'Dewi Damayanti'
else if
nim = '112' then
Edit2.Text:= 'Budi Fakhrudin'
else if
nim = '113' then
Edit2.Text:= 'Heri Sadewo'
else
Edit2.Text:='NIM
tidak terdaftar';
TUGAS:=strtofloat(edit3.Text);
MID:=strtofloat(edit4.Text);
NUTS:=strtofloat(edit5.text);
UAS:=strtofloat(edit6.text);
form2.Show;
form2.Edit1.Text:=floattostr(NA);
TUGAS :=
StrToFloat(Edit3.Text) * 0.1;
MID :=
StrToFloat(Edit4.Text) * 0.2;
NUTS :=
StrToFloat(Edit5.Text) * 0.3;
UAS :=
StrToFloat(Edit6.Text) * 0.4;
NA :=
TUGAS + MID + NUTS + UAS;
form2.Edit1.Text := FloatToStr(NA);
if (NA
>= 80) then
form2.Edit3.Text := 'Sangat Baik'
else if
(NA >= 65)and(NA < 80) then
form2.Edit3.Text := 'Baik'
Else if
(NA >= 55)and(NA < 65) then
form2.Edit3.Text := 'Sedang'
else if
(NA >= 45)and(NA < 55) then
form2.Edit3.Text := 'Kurang'
else
form2.Edit3.Text := 'Kurang Sekali';
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
form3.show;
close;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
edit4.Text:='';
edit5.Text:='';
edit6.Text:='';
edit1.setfocus
end;
end.
form2.Edit2.Text:=edit2.Text;
form2.edit4.Text:=edit1.Text;
if (NA
>= 80) then
form2.Edit3.Text := 'Sangat Baik'
else if
(NA >= 65)and(NA < 80) then
form2.Edit3.Text := 'Baik'
Else if
(NA >= 55)and(NA < 65) then
form2.Edit3.Text := 'Sedang'
else if
(NA >= 45)and(NA < 55) then
form2.Edit3.Text := 'Kurang'
else
form2.Edit3.Text := 'Kurang Sekali';
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
form3.show;
close;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
edit4.Text:='';
edit5.Text:='';
edit6.Text:='';
edit1.setfocus
end;
end.
2.
Form
2 ( Hasil Nilai)
·
Tampilan :
·
Daftar
komponen pada Form2 (Hasil Nilai)
Komponen
|
Properti
|
Nilai
Dari Properti
|
Label1
|
Name
|
Label1
|
|
Caption
|
No.Induk
|
Label2
|
Name
|
Label2
|
|
Caption
|
Nama
Siswa
|
Label3
|
Name
|
Label3
|
|
Caption
|
Nilai
Akhir
|
Label4
|
Name
|
Label4
|
|
Caption
|
Grade
|
Label5
|
Name
|
Label5
|
|
Caption
|
Hasil
Nilai
|
Edit1
|
Name
|
Kosongkan
|
Edit2
|
Name
|
Kosongkan
|
Edit3
|
Name
|
Kosongkan
|
Edit4
|
Name
|
Kosongkan
|
Button1
|
Name
|
Button1
|
|
Caption
|
Baru
|
·
Listing
Program (syntax) pada Form2 (Hasil Nilai)
unit hasil_nilai;
interface
uses
Windows,
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,
StdCtrls, jpeg, ExtCtrls;
type
TForm2 =
class(TForm)
Label1:
TLabel;
Label2:
TLabel;
Label3:
TLabel;
Label4:
TLabel;
Edit1:
TEdit;
Edit2:
TEdit;
Edit3:
TEdit;
Edit4:
TEdit;
Label5:
TLabel;
Image1: TImage;
Button1:
TButton;
procedure
Button1Click(Sender: TObject);
private
{ Private
declarations }
public
{ Public
declarations }
end;
var
Form2:
TForm2;
implementation
uses UTS;
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
begin
form1.show;
form1.edit1.Text:='';
form1.edit2.Text:='';
form1.edit3.Text:='';
form1.edit4.Text:='';
form1.edit5.Text:='';
form1.edit6.Text:='';
edit1.setfocus;
close;
end;
end.
3.
Form
3 (Menu)
·
Tampilan
·
Daftar
komponen pada Form 3 ( Menu)
Komponen
|
Properti
|
Nilai
Dari Properti
|
Label1
|
Name
|
Label1
|
|
Caption
|
Aplikasi
Nilai Siswa
|
Label2
|
Name
|
Label2
|
|
Caption
|
Masukan
Data Siswa
|
Button1
|
Name
|
Button1
|
|
Caption
|
Keluar
|
Button2
|
Name
|
Button2
|
|
Caption
|
Klik
Disini
|
Button3
|
Name
|
Button3
|
|
Caption
|
Klik
Disini
|
Timer
|
Name
|
Timer
|
·
Listing
Program (syntax) pada Form3 (Menu)
unit Menu;
interface
uses
Windows,
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,
StdCtrls, ExtCtrls, jpeg;
type
TForm3 =
class(TForm)
Button1:
TButton;
Label1:
TLabel;
Timer1:
TTimer;
Button2:
TButton;
Label2:
TLabel;
Image1:
TImage;
Label3:
TLabel;
Button3:
TButton;
Button4:
TButton;
procedure
Button1Click(Sender: TObject);
procedure
Timer1Timer(Sender: TObject);
procedure
Button2Click(Sender: TObject);
procedure
Button3Click(Sender: TObject);
procedure
Button4Click(Sender: TObject);
private
{ Private
declarations }
public
{ Public
declarations }
end;
var
Form3:
TForm3;
implementation
uses UTS, hasil_nilai, Tentang;
{$R *.dfm}
procedure TForm3.Button1Click(Sender: TObject);
begin
application.Terminate;
end;
procedure TForm3.Timer1Timer(Sender: TObject);
begin
Label1.Left:=label1.Left-1;
if Label1.left<20 label1.left:="1000;<o:p" then="">20>
end;
procedure TForm3.Button2Click(Sender: TObject);
begin
form1.show;
end;
procedure TForm3.Button3Click(Sender: TObject);
begin
form2.show;
end;
procedure TForm3.Button4Click(Sender: TObject);
begin
form4.show;
end;
end.
Source kode nya bisa didownload disini
berkunjung kemari sob
BalasHapusdisini ada tutor buat delphi dan vb
http://beniajha.blogspot.com/2014/06/cara-membuat-program-sederhana-daftar.html
http://simaknewsscom.blogspot.co.id/
BalasHapus