Rabu, 16 Februari 2011
Uses wincrt;
Const Loket = 55;
Kanan = 75;
UpBound = 11;
LowBound = 1;
Type Orang = Object
Badan : Array[1..3] Of String[6];
X,Y,Mentok : Byte;
Procedure init;
Procedure gerak;
End;
Antrian = object
Queue : Array[LowBound..UpBound] Of Orang;
Noel : integer;
Procedure Input(Var Out : Char);
Procedure Create;
Procedure insertion;
Procedure deletion;
Procedure doproses;
End;
Procedure Orang.Init;
Begin
X := 1; Y := 20; Mentok := Loket;
Badan[1] := (' ');
Badan[2] := (' -( )- ');
Badan[3] := ('__/^\__');
End;
Procedure Orang.Gerak;
Begin
repeat
GotoXY(X,Y); Write(Badan[1]);
GotoXY(X,Y+1); Write(Badan[2]);
GotoXY(X,Y+2); Write(Badan[3]);
Inc(X); GotoXY(16,6);
If X = 75 Then
Begin
GotoXY(X,Y); Clreol;
GotoXY(X,Y+1); Clreol;
GotoXY(X,Y+2); Write('______');
End;
Until X = Mentok;
End;
Procedure Antrian.input;
Var Pil : char;
Begin
GotoXY(1,2); Write('1. Bikin Antrian');
GotoXY(1,3); Write('2. Antrian Masuk');
GotoXY(1,4); Write('3. Antrian Keluar');
GotoXY(1,5); Write('4. Bye..Bye..');
GotoXY(1,6); Write(' PILIHAN [1..4] ? ');
Pil := Readkey; Write(Pil); Out := Pil;
End;
Procedure Antrian.create;
Var I : integer;
Begin
For I := 18 To 22 Do
Begin
GotoXY(1,I); Clreol;
end;
For I := 1 To 80 Do Write('_');
GotoXY(58,17); Write(' ANTRIAN KARCIS');
GotoXY(60,18); Write(' _______');
GotoXY(60,19); Write(' /_______\');
GotoXY(60,20); Write(' /-| | | | |-\');
GotoXY(60,21); Write(' | | | | | ');
GotoXY(60,22); Write(' __| LOKET |__');
GotoXY(60,23); Noel := 0;
End;
Procedure Antrian.Insertion;
Begin
If Noel >= upbound Then
Begin
GotoXY(3,23);
Write('Antrian Penuh');
Noel := UpBound;
End
Else
Begin
Inc(Noel); Queue[Noel].Init;
Queue[Noel].Mentok := (Loket - Noel * 5) + 5;
Queue[Noel].Gerak;
End;
End;
Procedure Antrian.Deletion;
Var I : integer;
Front : Orang;
Begin
If Noel < lowbound Then
Begin
GotoXY(59,23);
Write(' Antrian kosong'); Noel := 0;
End
Else
Begin
Dec(Noel);
GotoXY(55,20); Write(' ');
GotoXY(55,21); Write(' ');
GotoXY(55,22); Write('_______');
Front := Queue[1];
Front.Mentok := 75;
Front.X := 72;
Front.Gerak;
For I := 1 To Noel Do Queue[I].X := Queue[I+1].X;
For I := 1 To Noel Do Queue[I].Gerak;
End;
End;
Procedure Antrian.DoProses;
Var Menu : char;
Begin
Noel := 0;
Repeat
Input(Menu);
GotoXY(1,23); Clreol;
Case Menu Of
'1' : Create;
'2' : Insertion;
'3' : Deletion;
End;
until Menu = '4';
End;
{* PROGRAM UTAMA *}
Var Queue : Antrian;
Begin
Clrscr;
writeln ( ' program antrian tiket ' );
queue.doproses;
End.
About Me
Labels
- ansi (3)
- artikel (11)
- C++ (3)
- desain (1)
- Environment (1)
- Health (6)
- hot news (8)
- hotnews (1)
- imk (9)
- interfacing (1)
- komputer (1)
- linux (12)
- Motor-motor Listrik (1)
- organisasi komputer (1)
- penulisan ilmiah (1)
- persija (3)
- program pascal (8)
- resep masakan (12)
- teknik lingkungan (7)
- TIPS (4)
- tugas (1)
- UML (1)
Archives
-
▼
2011
(93)
-
▼
Februari
(49)
- Prosedur Sweeping Windows BAJAKAN
- Pembajakan Account Facebook dan Cara Mencegahnya
- Bagi yang Account Facebook di Crack
- program antrian tiket
- Membuat Recent Comment Di Blog
- Pengertian Jaringan Komputer
- INSTALASI UBUNTU 10.04 LUCID LYNX
- Siapa Calon Pengganti Hosni Mubarak?
- Resmi, Husni Mubarok Mundur
- RESEP – LUMPIA SEMARANG
- cara instal ubuntu di usb Flasdiks
- Cara instal dan membuka file rar di Ubuntu 10.04
- Resep Soto Aceh
- Resep Bakso Bakar
- Resep Bakso Kepiting Goreng
- Resep Daging Masak Taoge
- Resep Ayam Kukus Bumbu Kuning
- Resep Jus Anti Kolesterol
- Resep Jus Anggur Cola
- Resep Cake Cokelat Keju
- Resep Puding Karamel
- RESEP PUDING BUAH
- RESEP PUDING COKLAT
- program perkalian matrik
- program stack
- program antrian
- BAB IV GAYA DIALOG
- BAB III PEMODELAN SISTEM PENGOLAHAN MANUSIA
- BAB II ASPEK MANUSIA DALAM PEMROGRAMAN INTERAKTIF
- BAB II ASPEK MANUSIA DALAM PEMROGRAMAN INTERAKTIF
- Strategi Pengembangan Antarmuka
- Interaksi Manusia Komputer dalam Daur Hidup Pengem...
- Alat Bantu IMK
- Lingkup Bahasan IMK
- BaB 1 Pengertian IMK
- Program Mencari Luas Kerucut C++
- Program Mencari Luas Lingkaran & Volume Bola C++
- Program Bilangan Fibonaci C++
- parse
- Bagian 2
- Bagian 1
- ANALISIS DAN PERANCANGAN SISTEM HOTEL
- program cari_suku_fibonacci
- Program Konversi_Bilangan
- Program ganjil_genap
- Materi 1 Penulisan Ilmiah
- Daftar REPO Lokal Ubuntu 10.10 Maverik
- desain wearpack informatics engineering 09
- setting internet kartu 3 dimodem Huawei E220 Ubunt...
-
▼
Februari
(49)
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar