Source Code Program Bus Queue C++

 This is a Program Bus Queue
I created this program for the purposes TP.Struktur Data...in making this program I am Not Alone
i helped two friends..we make use of the programming language C++

The Following Source Program


#include<iostream.h>
#include<conio.h>

class node{
  public:
  int no;
  char nama[20];
  char jam[20];
  char tujuan[20];
  node * link;
  };
class atb{
public:
atb();
void menu();
void pendaftaran();
void data_antrian();
void operatorr();
void keluar();
void sinar_jaya();
void budiman();
void sumber_kencono();
void damri();
void antrian_sinar_jaya();
void antrian_budiman();
void antrian_sumber_kencono();
void antrian_damri();
void panggil_sinar_jaya();
void panggil_budiman();
void panggil_sumber_kencono();
void panggil_damri();


private:
node * front;
node * rear;
node * front1;
node * rear1;
node * front2;
node * rear2;
node * front3;
node * rear3;
char password[1];
char xx[1];
char pil,layanan,antrian,opr,panggil,back;
};

atb::atb(){
  front=rear=NULL;
  front1=rear1=NULL;
  front2=rear2=NULL;
  front3=rear3=NULL;
  }
void atb::menu() {
for(;;)   {
    clrscr();
    cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
    cout<<"|===========================================================================|\n";
    cout<<"|                                TUGAS PROYEK                               |\n";
    cout<<"|                                                                           |\n";
    cout<<"|                      Ari Kusuma Wardana     (08018363)                    |\n";
    cout<<"|                      Ahsan A. Sandiah       (10018133)                    |\n";
    cout<<"|                      Sofyan Hasan           (08018226)                    |\n";
    cout<<"|                                                                           |\n";
    cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
    cout<<"|===========================================================================|\n";
    cout<<"|                                                                           |\n";
    cout<<"|                                 MENU UTAMA                                |\n";
    cout<<"|                             ANTRIAN TIKET BUS                             |\n";
    cout<<"|                                                                           |\n";
    cout<<"|___________________________________________________________________________|\n";
    cout<<"|___________________________________________________________________________|\n";
    cout<<"|                                                                           |\n";
    cout<<"|                          1.PENDAFTARAN                                    |\n";
    cout<<"|                          2.DATA ANTRIAN                                   |\n";
    cout<<"|                          3.OPERATOR                                       |\n";
    cout<<"|                          4.KELUAR                                         |\n";
    cout<<"|                                                                           |\n";
    cout<<"|===========================================================================|\n";
    cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
    cout<<endl;
    cout<<"Masukkan Pilihan Anda : ";
    cin>>pil;
    cout<<endl;

    switch(pil){
    case '1'  : pendaftaran();
              break;
    case '2'  : data_antrian();
              break;
    case '3'  : operatorr();
              break;
    case '4'  : keluar();
              break;
              }
}
}

void atb::pendaftaran() {
for(;;) {
clrscr();
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                               MENU PENDAFTARAN                            |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|                                                                           |\n";
cout<<"|                      Pilih Layanan Bus yang Ingin Anda Gunakan :          |\n";
cout<<"|                      1.SINAR JAYA                                         |\n";
cout<<"|                      2.BUDIMAN                                            |\n";
cout<<"|                      3.SUMBER KENCONO                                     |\n";
cout<<"|                      4.DAMRI                                              |\n";
cout<<"|                      5.KEMBALI KE MENU UTAMA                              |\n";
cout<<"|                                                                           |\n";
cout<<"|***************************************************************************|\n";
cout<<"|===========================================================================|\n";
cout<<"Masukkan Pilihan Anda : ";
cin>>layanan;
cout<<endl;

switch(layanan){
    case '1'  : sinar_jaya();
              break;
    case '2'  : budiman();
              break;
    case '3'  : sumber_kencono();
              break;
    case '4'  : damri();
              break;
    case '5'  : menu();
              break;
    }
}
}

void atb::data_antrian(){
for(;;) {
clrscr();
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                               DATA ANTRIAN                                |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|                                                                           |\n";
cout<<"|                      Pilih Untuk Melihat Antrian       :                  |\n";
cout<<"|                      1.ANTRIAN BUS SINAR JAYA                             |\n";
cout<<"|                      2.ANTRIAN BUS BUDIMAN                                |\n";
cout<<"|                      3.ANTRIAN BUS SUMBER KENCONO                         |\n";
cout<<"|                      4.ANTRIAN BUS DAMRI                                  |\n";
cout<<"|                      5.KEMBALI KE MENU UTAMA                              |\n";
cout<<"|                                                                           |\n";
cout<<"|***************************************************************************|\n";
cout<<"|===========================================================================|\n";
cout<<"Masukkan Pilihan Anda : ";
cin>>antrian;
cout<<endl;
switch(antrian){
    case '1'  : antrian_sinar_jaya();
              break;
    case '2'  : antrian_budiman();
              break;
    case '3'  : antrian_sumber_kencono();
              break;
    case '4'  : antrian_damri();
              break;
    case '5'  : menu();
              break;
             }
}
}

void atb::operatorr(){

clrscr();
char key[]="a";
cout<<"Masukan Password : " ;
cin>>password;
if (*password==*key) {
for(;;)  {
clrscr();
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                            PEMANGGILAN ANTRIAN                            |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|                                                                           |\n";
cout<<"|               Pilih Untuk Melihat Antrian yang Akan Dipanggil :           |\n";
cout<<"|                                                                           |\n";
cout<<"|                      1.PANGGIL ANTRIAN BUS SINAR JAYA                     |\n";
cout<<"|                      2.PANGGIL ANTRIAN BUDIMAN                            |\n";
cout<<"|                      3.PANGGIL ANTRIAN SUMBER KENCONO                     |\n";
cout<<"|                      4.PANGGIL ANTRIAN DAMRI                              |\n";
cout<<"|                      5.KEMBALI KE MENU UTAMA                              |\n";
cout<<"|                                                                           |\n";
cout<<"|***************************************************************************|\n";
cout<<"|===========================================================================|\n";
cout<<"Masukkan Pilihan Anda : ";
cin>>panggil;
cout<<endl;
switch(panggil){
    case '1'  : panggil_sinar_jaya();
              break;
    case '2'  : panggil_budiman();
              break;
    case '3'  : panggil_sumber_kencono();
              break;
    case '4'  : panggil_damri();
              break;
    case '5'  : menu();
              break;
                 }
      }
}
}

void atb::keluar() {

}

void atb::sinar_jaya(){
  static int n=0;
  n++;
  node * baru = new node;
cout<<"------------------------Pengisian Data------------------------- \n";
cout<<endl;
baru->no=n;
cout<<"Masukan Nama : ";
cin >>baru->nama;
cout<<"Masukkan Jam Keberangkatan :";
cin >>baru->jam;
cout<<"Masukkan Tujuan Keberangkatan :";
cin >>baru->tujuan;
for(;;){
clrscr();
cout<<endl;
cout<<"|********************************************************|\n";
cout<<"|========================================================|\n";
cout<<"|                KARTU ANTRIAN SINAR JAYA                  |\n";
cout<<"|________________________________________________________|\n";
cout<<"|NOMOR ANTRIAN       :"<<baru->no     ;gotoxy(58,6); cout<<"|"<<endl;
cout<<"|NAMA                :"<<baru->nama   ;gotoxy(58,7); cout<<"|"<<endl;;
cout<<"|JAM KEBERANGKATAN   :"<<baru->jam   ;gotoxy(58,9); cout<<"|"<<endl;;
cout<<"|TUJUAN              :"<<baru->tujuan ;gotoxy(58,10); cout<<"|"<<endl;;
cout<<"|========================================================|\n";
cout<<"|          Simpan Dengan Baik Kartu Antrian Ini          |\n";
cout<<"|              Terima Kasih Telah Mendaftar              |\n";
cout<<"|          ..............(^_^).................          |\n";
cout<<"|********************************************************|\n";
cout<<endl<<endl;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"| 1 = Kembali ke Menu Utama                                                 |\n";
cout<<"| 2 = Kembali ke Menu Pendaftaran                                           |\n";
cout<<"|===========================================================================|\n";
cout<<"=";
if(front != NULL){
  rear->link=baru;
  rear=baru;
  rear->link=NULL;
  }
else{
  front=baru;
  rear=baru;
  rear->link=NULL;
  }
  cin>>back;
cout<<endl;
switch(back){
    case '1'  : menu();
              break;
    case '2'  : pendaftaran();
              break;
    }
}
}

void atb::budiman(){
node * baru=new node;
static int n=0;
n++;
baru->no=n;
cout<<"-------------------Pengisian Data------------------------- \n";
cout<<endl;
cout<<"Masukan Nama : ";
cin >>baru->nama;
cout<<"Masukan Jam Keberangkatan :";
cin >>baru->jam;
cout<<"Masukan Tujuan Keberangkatan :";
cin >>baru->tujuan;

for(;;){
clrscr();
cout<<endl;
cout<<"|********************************************************|\n";
cout<<"|========================================================|\n";
cout<<"|               KARTU ANTRIAN BUDIMAN                    |\n";
cout<<"|________________________________________________________|\n";
cout<<"|NOMOR ANTRIAN       :"<<baru->no     ;gotoxy(58,6); cout<<"|"<<endl;
cout<<"|NAMA                :"<<baru->nama   ;gotoxy(58,7); cout<<"|"<<endl;;
cout<<"|JAM KEBERANGKATAN   :"<<baru->jam  ;gotoxy(58,8); cout<<"|"<<endl;;
cout<<"|JURUSAN             :"<<baru->tujuan   ;gotoxy(58,9); cout<<"|"<<endl;;
cout<<"|========================================================|\n";
cout<<"|          Simpan Dengan Baik Kartu Antrian Ini          |\n";
cout<<"|              Terima Kasih Telah Mendaftar              |\n";
cout<<"|          ..............(^_^).................          |\n";
cout<<"|********************************************************|\n";
cout<<endl<<endl;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"| 1 = Kembali ke Menu Utama                                                 |\n";
cout<<"| 2 = Kembali ke Menu Pendaftaran                                           |\n";
cout<<"|===========================================================================|\n";
cout<<"=";
if(front1 != NULL){
  rear1->link=baru;
  rear1=baru;
  rear1->link=NULL;
  }
else{
  front1=baru;
  rear1=baru;
  rear1->link=NULL;
  }

cin>>back;
cout<<endl;
switch(back){
    case '1'  : menu();
              break;
    case '2'  : pendaftaran();
              break;
    }
}
}

void atb::sumber_kencono(){
node * baru=new node;
static int n=0;
n++;
baru->no=n;
cout<<"-------------------Pengisian Data------------------------- \n";
cout<<endl;
cout<<"Masukkan Nama : ";
cin >>baru->nama;
cout<<"Masukkan Jam Keberangkatan :";
cin >>baru->jam;
cout<<"Masukkan Tujuan Keberangkatan :";
cin >>baru->tujuan;

for(;;){
clrscr();
cout<<endl;
cout<<"|********************************************************|\n";
cout<<"|========================================================|\n";
cout<<"|               KARTU ANTRIAN SUMBER KENCONO             |\n";
cout<<"|________________________________________________________|\n";
cout<<"|NOMOR ANTRIAN       :"<<baru->no     ;gotoxy(58,6); cout<<"|"<<endl;
cout<<"|NAMA                :"<<baru->nama   ;gotoxy(58,7); cout<<"|"<<endl;;
cout<<"|JAM KEBERANGKATAN   :"<<baru->jam  ;gotoxy(58,8); cout<<"|"<<endl;;
cout<<"|JURUSAN             :"<<baru->tujuan   ;gotoxy(58,9); cout<<"|"<<endl;;
cout<<"|========================================================|\n";
cout<<"|          Simpan Dengan Baik Kartu Antrian Ini          |\n";
cout<<"|              Terima Kasih Telah Mendaftar              |\n";
cout<<"|          ..............(^_^).................          |\n";
cout<<"|********************************************************|\n";
cout<<endl<<endl;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"| 1 = Kembali ke Menu Utama                                                 |\n";
cout<<"| 2 = Kembali ke Menu Pendaftaran                                           |\n";
cout<<"|===========================================================================|\n";
cout<<"=";
if(front1 != NULL){
  rear1->link=baru;
  rear1=baru;
  rear1->link=NULL;
  }
else{
  front1=baru;
  rear1=baru;
  rear1->link=NULL;
  }

cin>>back;
cout<<endl;
switch(back){
    case '1'  : menu();
              break;
    case '2'  : pendaftaran();
              break;
    }
}
}


void atb::damri(){
node * baru=new node;
static int n=0;
n++;
baru->no=n;
cout<<"-------------------Pengisian Data------------------------- \n";
cout<<endl;
cout<<"Masukkan Nama : ";
cin >>baru->nama;
cout<<"Masukkan Jam Keberangkatan :";
cin >>baru->jam;
cout<<"Masukkan Tujuan Keberangkatan :";
cin >>baru->tujuan;

for(;;){
clrscr();
cout<<endl;
cout<<"|********************************************************|\n";
cout<<"|========================================================|\n";
cout<<"|               KARTU ANTRIAN DAMRI                      |\n";
cout<<"|________________________________________________________|\n";
cout<<"|NOMOR ANTRIAN       :"<<baru->no     ;gotoxy(58,6); cout<<"|"<<endl;
cout<<"|NAMA                :"<<baru->nama   ;gotoxy(58,7); cout<<"|"<<endl;;
cout<<"|JAM KEBERANGKATAN   :"<<baru->jam  ;gotoxy(58,8); cout<<"|"<<endl;;
cout<<"|JURUSAN             :"<<baru->tujuan   ;gotoxy(58,9); cout<<"|"<<endl;;
cout<<"|========================================================|\n";
cout<<"|          Simpan Dengan Baik Kartu Antrian Ini          |\n";
cout<<"|              Terima Kasih Telah Mendaftar              |\n";
cout<<"|          ..............(^_^).................          |\n";
cout<<"|********************************************************|\n";
cout<<endl<<endl;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"| 1 = Kembali ke Menu Utama                                                 |\n";
cout<<"| 2 = Kembali ke Menu Pendaftaran                                           |\n";
cout<<"|===========================================================================|\n";
cout<<"=";
if(front1 != NULL){
  rear1->link=baru;
  rear1=baru;
  rear1->link=NULL;
  }
else{
  front1=baru;
  rear1=baru;
  rear1->link=NULL;
  }

cin>>back;
cout<<endl;
switch(back){
    case '1'  : menu();
              break;
    case '2'  : pendaftaran();
              break;
    }
}
}


void atb::antrian_sinar_jaya(){
for(;;){
int i=0;
node * cetak=front;
clrscr();
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                          DATA ANTRIAN  SINAR JAYA                         |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"| No. |       Nama         |  Jam Keberangkatan   |       Jurusan           |\n";
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
if(cetak != NULL){
while(cetak != NULL){
  i++;
  gotoxy(1,7+i);
  cout<<"|";
  gotoxy(3,7+i);
  cout<<cetak->no;
  gotoxy(6,7+i);
  cout<<"|";
  gotoxy(8,7+i);
  cout<<cetak->nama;
  gotoxy(27,7+i);
  cout<<"|";
  gotoxy(29,7+i);
  cout<<cetak->jam;
  gotoxy(42,7+i);
  cout<<"|";
  gotoxy(44,7+i);
  cout<<cetak->tujuan;
  gotoxy(59,7+i);
  cout<<"|";
  gotoxy(77,7+i);
  cout<<"|" ;
  cetak=cetak->link;
  }
}
else{
cout<<"\n .............................. Masih Kosong........................"<<endl ;
}
cout<<endl<<endl;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"| 1 = Kembali ke Menu Utama                                                 |\n";
cout<<"| 2 = Kembali ke Menu Data Antrian                                          |\n";
cout<<"|===========================================================================|\n";
cout<<"=";
cin>>back;
switch(back){
    case '1'  : menu();
              break;
    case '2'  : data_antrian();
              break;

    }
}
}

void atb::antrian_budiman(){
for(;;){
int i=0;
node * cetak= front1;
clrscr();
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                          DATA ANTRIAN BUDIMAN                             |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"| No. |       Nama         |  Jam Keberangkatan   |       Jurusan           |\n";
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
if(cetak != NULL){
while(cetak != NULL){
  i++;
  gotoxy(1,7+i);
  cout<<"|";
  gotoxy(3,7+i);
  cout<<cetak->no;
  gotoxy(6,7+i);
  cout<<"|";
  gotoxy(8,7+i);
  cout<<cetak->nama;
  gotoxy(27,7+i);
  cout<<"|";
  gotoxy(29,7+i);
  cout<<cetak->jam;
  gotoxy(42,7+i);
  cout<<"|";
  gotoxy(44,7+i);
  cout<<cetak->tujuan;
  gotoxy(59,7+i);
  cout<<"|";
  gotoxy(77,7+i);
  cout<<"|" ;
  cetak=cetak->link;
  }
}
else{
cout<<"\n ........................... Masih Kosong......................."<<endl ;
}
cout<<endl<<endl;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"| 1 = Kembali ke Menu Utama                                                 |\n";
cout<<"| 2 = Kembali ke Menu Data Antrian                                          |\n";
cout<<"|===========================================================================|\n";
cout<<"=";
cin>>back;
cout<<endl;
switch(back){
    case '1'  : menu();
              break;
    case '2'  : data_antrian();
              break;

    }
}
}

void atb::antrian_sumber_kencono(){
for(;;){
int i=0;
node * cetak=front2;
clrscr();
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                       DATA ANTRIAN SUMBER KENCONO                         |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"| No. |       Nama         |  Jam Keberangkatan   |       Jurusan           |\n";
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
if(cetak != NULL){
while(cetak != NULL){
  i++;
  gotoxy(1,7+i);
  cout<<"|";
  gotoxy(3,7+i);
  cout<<cetak->no;
  gotoxy(6,7+i);
  cout<<"|";
  gotoxy(8,7+i);
  cout<<cetak->nama;
  gotoxy(27,7+i);
  cout<<"|";
  gotoxy(29,7+i);
  cout<<cetak->jam;
  gotoxy(42,7+i);
  cout<<"|";
  gotoxy(44,7+i);
  cout<<cetak->tujuan;
  gotoxy(59,7+i);
  cout<<"|";
  gotoxy(77,7+i);
  cout<<"|" ;
  cetak=cetak->link;

  }
}
else{
cout<<"\n ................. Masih Kosong....................."<<endl ;
}
cout<<endl<<endl;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"| 1 = Kembali ke Menu Utama                                                 |\n";
cout<<"| 2 = Kembali ke Menu Data Antrian                                          |\n";
cout<<"|===========================================================================|\n";
cout<<"=";
cin>>back;
cout<<endl;
switch(back){
    case '1'  : menu();
              break;
    case '2'  : data_antrian();
              break;

    }
}
}

void atb::antrian_damri(){
for(;;){
int i=0;
node * cetak=front3;
clrscr();
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                          DATA ANTRIAN DAMRI                               |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"| No. |       Nama         |  Jam Keberangkatan   |       Jurusan           |\n";
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
if(cetak != NULL){
while(cetak != NULL){
  i++;
  gotoxy(1,7+i);
  cout<<"|";
  gotoxy(3,7+i);
  cout<<cetak->no;
  gotoxy(6,7+i);
  cout<<"|";
  gotoxy(8,7+i);
  cout<<cetak->nama;
  gotoxy(27,7+i);
  cout<<"|";
  gotoxy(29,7+i);
  cout<<cetak->jam;
  gotoxy(42,7+i);
  cout<<"|";
  gotoxy(44,7+i);
  cout<<cetak->tujuan;
  gotoxy(59,7+i);
  cout<<"|";
  gotoxy(77,7+i);
  cout<<"|" ;
  cetak=cetak->link;
  }
}
else{
cout<<"\n .................................. Masih Kosong....................."<<endl ;
}
cout<<endl<<endl;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"| 1 = Kembali ke Menu Utama                                                 |\n";
cout<<"| 2 = Kembali ke Menu Data Antrian                                          |\n";
cout<<"|===========================================================================|\n";
cout<<"=";
cin>>back;
cout<<endl;
switch(back){
    case '1'  : menu();
              break;
    case '2'  : data_antrian();
              break;
    }
}
}

void atb::panggil_sinar_jaya(){
node * cetak=front;
if(cetak ==NULL){
clrscr();
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                      PEMANGGILAN ANTRIAN  SINAR JAYA                      |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";

cout<<"\n \n...................... ANTRIAN  SINAR JAYA KOSONG ....................."<<endl ;}
else   {
while(*xx!='p'){
clrscr();
int i=0;
node * cetak= front;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                      PEMANGGILAN ANTRIAN SINAR JAYA                       |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"| No. |       Nama         |  Jam Keberangkatan   |       Jurusan           |\n";
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
while(cetak != NULL){
  i++;
  gotoxy(1,7+i);
  cout<<"|";
  gotoxy(3,7+i);
  cout<<cetak->no;
  gotoxy(6,7+i);
  cout<<"|";
  gotoxy(8,7+i);
  cout<<cetak->nama;
  gotoxy(27,7+i);
  cout<<"|";
  gotoxy(29,7+i);
  cout<<cetak->jam;
  gotoxy(42,7+i);
  cout<<"|";
  gotoxy(44,7+i);
  cout<<cetak->tujuan;
  gotoxy(59,7+i);
  cout<<"|";
  gotoxy(77,7+i);
  cout<<"|" ;
  cetak=cetak->link;  }
  cout <<endl<<"\n ----> [p] Untuk Memanggil Antrian : ";
  cin>>xx;
  }

}

char pgl[]="p";
if(*pgl==*xx){
  node * temp=new node;
  if(front != NULL){
    temp=front;
    front=front->link;
    delete temp;
    clrscr();
    int i=0;
    node * cetak= front;
    cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
    cout<<"|===========================================================================|\n";
    cout<<"|                      PEMANGGILAN ANTRIAN SINAR JAYA                         |\n";
    cout<<"|___________________________________________________________________________|\n";
    cout<<"|___________________________________________________________________________|\n";
    cout<<"| No. |       Nama         |  Jam Keberangkatan   |       Jurusan           |\n";
    cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
    if(cetak != NULL){
    while(cetak != NULL){
    i++;
    gotoxy(1,7+i);
    cout<<"|";
    gotoxy(3,7+i);
    cout<<cetak->no;
    gotoxy(6,7+i);
    cout<<"|";
    gotoxy(8,7+i);
    cout<<cetak->nama;
    gotoxy(27,7+i);
    cout<<"|";
    gotoxy(29,7+i);
    cout<<cetak->jam;
    gotoxy(42,7+i);
    cout<<"|";
    gotoxy(44,7+i);
    cout<<cetak->tujuan;
    gotoxy(59,7+i);
    cout<<"|";
    gotoxy(77,7+i);
    cout<<"|" ;
    cetak=cetak->link;
    cout<<endl;
    }
    cout<<endl<<"\ 3 = Panggil Antrian Sinar Jaya Lagi ";
    }
    else{cout<<"\n   ................ Antrian Kosong...................."<<endl ;}
  }

}


cout<<endl<<endl;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"| 1 = Kembali ke Menu Utama                                                 |\n";
cout<<"| 2 = Kembali ke Menu Pemanggilan                                           |\n";
cout<<"|===========================================================================|\n";
cout<<"=";
cin>>back;
cout<<endl;
switch(back){
    case '1'  : menu();
              break;
    case '2'  : operatorr();
              break;
    case '3'  :panggil_sinar_jaya ();
              break;
    }
}



void atb::panggil_budiman(){
node * cetak=front1;
if(cetak ==NULL){
clrscr();
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                     PEMANGGILAN ANTRIAN  BUDIMAN                          |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";

cout<<"\n \n..................... ANTRIAN  BUDIMAN KOSONG ....................."<<endl ;}
else   {
while(*xx!='p'){
clrscr();
int i=0;
node * cetak= front1;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                      PEMANGGILAN ANTRIAN BUDIMAN                          |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"| No. |       Nama         |  Jam Keberangkatan   |       Jurusan           |\n";
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
while(cetak != NULL){
  i++;
  gotoxy(1,7+i);
  cout<<"|";
  gotoxy(3,7+i);
  cout<<cetak->no;
  gotoxy(6,7+i);
  cout<<"|";
  gotoxy(8,7+i);
  cout<<cetak->nama;
  gotoxy(27,7+i);
  cout<<"|";
  gotoxy(29,7+i);
  cout<<cetak->jam;
  gotoxy(42,7+i);
  cout<<"|";
  gotoxy(44,7+i);
  cout<<cetak->tujuan;
  gotoxy(59,7+i);
  cout<<"|";
  gotoxy(77,7+i);
  cout<<"|" ;
  cetak=cetak->link;  }
  cout <<endl<<"\n ----> [p] Untuk Memanggil Antrian : ";
  cin>>xx;
  }

}

char pgl[]="p";
if(*pgl==*xx){
  node * temp=new node;
  if(front1 != NULL){
    temp=front1;
    front1=front1->link;
    delete temp;
    clrscr();
    int i=0;
    node * cetak= front1;
    cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
    cout<<"|===========================================================================|\n";
    cout<<"|                      PEMANGGILAN ANTRIAN BUDIMAN                          |\n";
    cout<<"|___________________________________________________________________________|\n";
    cout<<"|___________________________________________________________________________|\n";
    cout<<"| No. |       Nama         |  Jam Keberangkatan   |       Jurusan           |\n";
    cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
    if(cetak != NULL){
    while(cetak != NULL){
    i++;
    gotoxy(1,7+i);
    cout<<"|";
    gotoxy(3,7+i);
    cout<<cetak->no;
    gotoxy(6,7+i);
    cout<<"|";
    gotoxy(8,7+i);
    cout<<cetak->nama;
    gotoxy(27,7+i);
    cout<<"|";
    gotoxy(29,7+i);
    cout<<cetak->jam;
    gotoxy(42,7+i);
    cout<<"|";
    gotoxy(44,7+i);
    cout<<cetak->tujuan;
    gotoxy(59,7+i);
    cout<<"|";
    gotoxy(77,7+i);
    cout<<"|" ;
    cetak=cetak->link;
    cout<<endl<<endl;
    }
    cout<<"\ 3 = Panggil Antrian Budiman Lagi ";
    }
    else{cout<<"\n   ................ Antrian Kosong...................."<<endl ;}
  }

}


cout<<endl<<endl;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"| 1 = Kembali ke Menu Utama                                                 |\n";
cout<<"| 2 = Kembali ke Menu Pemanggilan                                           |\n";
cout<<"|===========================================================================|\n";
cout<<"=";
cin>>back;
cout<<endl;
switch(back){
    case '1'  : menu();
              break;
    case '2'  : operatorr();
              break;
    case '3'  :panggil_budiman ();
              break;
    }
}

void atb::panggil_sumber_kencono(){
node * cetak=front2;
if(cetak ==NULL){
clrscr();
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                 PEMANGGILAN ANTRIAN  SUMBER KENCONO                    |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";

cout<<"\n \n................. ANTRIAN  SUMBER KENCONO KOSONG ....................."<<endl ;}
else   {
while(*xx!='p'){
clrscr();
int i=0;
node * cetak= front2;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                   PEMANGGILAN ANTRIAN SUMBER KENCONO                      |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"| No. |       Nama         |  Jam Keberangkatan   |       Jurusan           |\n";
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
while(cetak != NULL){
  i++;
  gotoxy(1,7+i);
  cout<<"|";
  gotoxy(3,7+i);
  cout<<cetak->no;
  gotoxy(6,7+i);
  cout<<"|";
  gotoxy(8,7+i);
  cout<<cetak->nama;
  gotoxy(27,7+i);
  cout<<"|";
  gotoxy(29,7+i);
  cout<<cetak->jam;
  gotoxy(42,7+i);
  cout<<"|";
  gotoxy(44,7+i);
  cout<<cetak->tujuan;
  gotoxy(59,7+i);
  cout<<"|";
  gotoxy(77,7+i);
  cout<<"|" ;
  cetak=cetak->link;  }
  cout <<endl<<"\n ----> [p]Untuk Memanggil Antrian : ";
  cin>>xx;
  }

}

char pgl[]="p";
if(*pgl==*xx){
  node * temp=new node;
  if(front2 != NULL){
    temp=front2;
    front2=front2->link;
    delete temp;
    clrscr();
    int i=0;
    node * cetak= front2;
    cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
    cout<<"|===========================================================================|\n";
    cout<<"|                  PEMANGGILAN ANTRIAN SUMBER KENCONO                   |\n";
    cout<<"|___________________________________________________________________________|\n";
    cout<<"|___________________________________________________________________________|\n";
    cout<<"| No. |       Nama         |  Jam Keberangkatan   |       Jurusan           |\n";
    cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
    if(cetak != NULL){
    while(cetak != NULL){
    i++;
    gotoxy(1,7+i);
    cout<<"|";
    gotoxy(3,7+i);
    cout<<cetak->no;
    gotoxy(6,7+i);
    cout<<"|";
    gotoxy(8,7+i);
    cout<<cetak->nama;
    gotoxy(27,7+i);
    cout<<"|";
    gotoxy(29,7+i);
    cout<<cetak->jam;
    gotoxy(42,7+i);
    cout<<"|";
    gotoxy(44,7+i);
    cout<<cetak->tujuan;
    gotoxy(59,7+i);
    cout<<"|";
    gotoxy(77,7+i);
    cout<<"|" ;
    cetak=cetak->link;
    cout<<endl<<endl;
    }
    cout<<endl<<"\ 3 = Panggil Antrian Sumber Kencono Lagi ";
    }
    else{cout<<"\n   ................ Antrian Kosong...................."<<endl ;}
  }

}

cout<<endl<<endl;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"| 1 = Kembali ke Menu Utama                                                 |\n";
cout<<"| 2 = Kembali ke Menu Pemanggilan                                           |\n";
cout<<"|===========================================================================|\n";
cout<<"=";
cin>>back;
cout<<endl;
switch(back){
    case '1'  : menu();
              break;
    case '2'  : operatorr();
              break;
    case '3'  :panggil_sumber_kencono();
              break;
    }
}


void atb::panggil_damri(){
  node * cetak=front3;
if(cetak ==NULL){
clrscr();
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                       PEMANGGILAN ANTRIAN  DAMRI                   |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";

cout<<"\n \n.....................ANTRIAN  DAMRI KOSONG ......................."<<endl ;}
else   {
while(*xx!='p'){
clrscr();
int i=0;
node * cetak= front3;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"|===========================================================================|\n";
cout<<"|                      PEMANGGILAN ANTRIAN DAMRI                     |\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"|___________________________________________________________________________|\n";
cout<<"| No. |       Nama         |  Jam Keberangkatan   |       Jurusan           |\n";
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
while(cetak != NULL){
  i++;
  gotoxy(1,7+i);
  cout<<"|";
  gotoxy(3,7+i);
  cout<<cetak->no;
  gotoxy(6,7+i);
  cout<<"|";
  gotoxy(8,7+i);
  cout<<cetak->nama;
  gotoxy(27,7+i);
  cout<<"|";
  gotoxy(29,7+i);
  cout<<cetak->jam;
  gotoxy(42,7+i);
  cout<<"|";
  gotoxy(44,7+i);
  cout<<cetak->tujuan;
  gotoxy(59,7+i);
  cout<<"|";
  gotoxy(77,7+i);
  cout<<"|" ;
  cetak=cetak->link;  }
  cout <<endl<<"\n ----> [p] Untuk Memanggil Antrian : ";
  cin>>xx;
  }

}

char pgl[]="p";
if(*pgl==*xx){
  node * temp=new node;
  if(front3 != NULL){
    temp=front3;
    front3=front3->link;
    delete temp;
    clrscr();
    int i=0;
    node * cetak= front3;
    cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
    cout<<"|===========================================================================|\n";
    cout<<"|                     PEMANGGILAN ANTRIAN DAMRI                       |\n";
    cout<<"|___________________________________________________________________________|\n";
    cout<<"|___________________________________________________________________________|\n";
    cout<<"| No |       Nama         |No. Kendaraan | Merk Kendaraan |jenis modifikasi |\n";
    cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
    if(cetak != NULL){
    while(cetak != NULL){
    i++;
    gotoxy(1,7+i);
    cout<<"|";
    gotoxy(3,7+i);
    cout<<cetak->no;
    gotoxy(6,7+i);
    cout<<"|";
    gotoxy(8,7+i);
    cout<<cetak->nama;
    gotoxy(27,7+i);
    cout<<"|";
    gotoxy(29,7+i);
    cout<<cetak->jam;
    gotoxy(42,7+i);
    cout<<"|";
    gotoxy(44,7+i);
    cout<<cetak->tujuan;
    gotoxy(59,7+i);
    cout<<"|";
    gotoxy(77,7+i);
    cout<<"|" ;
    cetak=cetak->link;
    cout<<endl<<endl;
    }
    cout<<endl<<"\ 3 = Panggil Antrian Modifikasi Lagi ";
    }
    else{cout<<"\n   ................ Antrian Kosong...................."<<endl ;}
  }

}

cout<<endl<<endl;
cout<<"|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n";
cout<<"| 1 = Kembali ke Menu Utama                                                 |\n";
cout<<"| 2 = Kembali ke Menu Pemanggilan                                           |\n";
cout<<"|===========================================================================|\n";
cout<<"=";
cin>>back;
cout<<endl;
switch(back){
    case '1'  : menu();
              break;
    case '2'  : operatorr();
              break;
    case '3'  :panggil_damri();
              break;
    }


}

int main () {
atb x;
x.menu();
return 0;
}

Posted in , . Bookmark the permalink. RSS feed for this post.

Leave a Reply

Pages

Search

Sandiah Notes Template Sandroid11.blogspot.com.