| 1 comments ]


 Castlevania: Lords of Shadow cheats are available in a limited number i am looking for it as soon as the cheats will be available i'll post it here soon.
Read More →

| 1 comments ]

This is final OOP project developed by Rana Muhammad Aryan khan, students can use our code as refernce for your projects.

#include<iostream>
#include<iomanip>
#include<conio.h>
#include<string>
#include<windows.h>
#include<fstream>
using namespace std;

   char Local_Destinationination[5][20]={"LAHORE","ISLAMABAD","KARACHI","PESHAWAR","QUETTA"};
       char International_Destinationination[10][20]={"LONDON","BERLIN","DUBAI","NEW YORK","BEIJING","PARIS","CAPE TOWN","TOKYO","LOS ANGELES","MUMBAI" };
class Flight_Time
{
protected:
 int choice;
public:
 void getdata()
 {
  cout<<"ON WHICH TIME YOU WANT TO TRAVEL"<<endl;
  cout<<"PRESS 1 FOR 11 AM"<<endl;
  cout<<"PRESS 2 FOR 10 AM"<<endl;
  cout<<"PRESS 3 FOR 9 AM"<<endl;
  cin>>choice;
 }
 void show()
 {
  if(choice==1)
  {
    cout<<"|                                                                         "<<endl;
    cout<<"|flight Flight_Time 11 AM                                                        "<<endl;
    cout<<"|_________________________________________________________________________"<<endl;
    cout<<"                  GOOD BYE AND HAVE A SAFE JOURNEY                        "<<endl;
    ofstream outfile;
    outfile.open("E:\\E_ticket.txt",ios::app);
    outfile<<"|                                                                         "<<endl<<
             "|flight Flight_Time 11 AM                                                        "<<endl<<
                         "|_________________________________________________________________________"<<endl<<
       "                  GOOD BYE AND HAVE A SAFE JOURNEY                        "<<endl;
  }
  if(choice==2)
  {
    cout<<"|                                                                         "<<endl;
    cout<<"|flight Flight_Time 10 AM                                                        "<<endl;
    cout<<"|_________________________________________________________________________"<<endl;
    cout<<"                  GOOD BYE AND HAVE A SAFE JOURNEY                        "<<endl;
    ofstream outfile;
    outfile.open("E:\\E_ticket.txt",ios::app);
    outfile<<"|                                                                         "<<endl<<
             "|flight Flight_Time 10 AM                                                        "<<endl<<
                         "|_________________________________________________________________________"<<endl<<
       "                  GOOD BYE AND HAVE A SAFE JOURNEY                        "<<endl;
  }
  if(choice==3)
  {
    cout<<"|                                                                         "<<endl;
    cout<<"|flight Flight_Time 9 AM                                                        "<<endl;
    cout<<"|_________________________________________________________________________"<<endl;
    cout<<"                  GOOD BYE AND HAVE A SAFE JOURNEY                        "<<endl;
    ofstream outfile;
    outfile.open("E:\\E_ticket.txt",ios::app);
    outfile<<"|                                                                         "<<endl<<
             "|flight Flight_Time 9 AM                                                        "<<endl<<
                         "|_________________________________________________________________________"<<endl<<
       "                  GOOD BYE AND HAVE A SAFE JOURNEY                        "<<endl;
  }
 }
};
class passenger
{
public:
    virtual void getdata()
 {
 }
virtual void show()
 {
 }
};
class booking : public passenger
{
protected:
char ch;
 char First_Name[60];
 char Last_Name[60];
 char Address[60];
 char Current_Location[30];
 char Destination[30];
 char Reservation_No[60];
 int Option;
public:
 void getdata()
 {
  cout<<setw(40)<<"\n\n        ::Please enter the required information for passenger number::"<<endl;
  cout<<"\n\n\nEnter the First_Name of passenger: ";
   cin.getline(First_Name,60);
   cout<<endl;
   cout<<"Enter the Last_Name of passenger: ";
   cin.getline(Last_Name,60);
   cout<<endl<<endl;
   cout<<"Enter Address of passenger:  ";
   cin.getline(Address,60);
   cout<<endl<<endl;
   cout<<"Enter the Resevation No. of Ticket"<<endl;
   cin.getline(Reservation_No,60);
   cout<<endl;
   cout<<"Enter the current location of passenger(IN CAPITAL LETTERS ONLY):  ";
   cin.getline(Current_Location,60);
   cout<<endl<<endl;
   cout<<"Enter the Destinationination of passenger(IN CAPITAL LETTERS ONLY):  ";
   cin.getline(Destination,60);
   cout<<endl<<endl;
   system("CLS");
 }
 void show()
 {
   cout<<setw(40)<<"Your E-Ticket is :"<<endl;
   int Ticket_No=1;
   int Reference_No=12345;
  cout<<"                           AIRLINE TICKET                                 "<<endl;
  cout<<"|Ticket No."<<Ticket_No<<"                                Reference No."<<Reference_No<<"\t  "<<endl;
  cout<<"|_________________________________________________________________________"<<endl;
  cout<<"|Resevation No. :"<<Reservation_No<<"                                     "<<endl;
  cout<<"|__________________________________________________________________________"<<endl;
  cout<<"|Passenger Information :                                                  "<<endl;
  cout<<"|Name :"<<Last_Name<<"/"<<First_Name<<"                                     "<<endl;
  cout<<"|                                                                         "<<endl;
  cout<<"|Address :"<<Address<<"                                                   "<<endl;
  cout<<"|_________________________________________________________________________"<<endl;
     cout<<"|flight Information :                                                     "<<endl;
  cout<<"|12 aug 2011                                                              "<<endl;
  cout<<"|BOING 747                                                                "<<endl;
  cout<<"|_________________________________________________________________________"<<endl;
  cout<<"|Depart :"<<Current_Location<<"                                                      "<<endl;
  cout<<"|Arrive :"<<Destination<<"                                                       "<<endl;
  cout<<"|*BAGGAGE allowed 40 Kilos                                                "<<endl;
  cout<<"|*contact Airline to Confirm baggage allowance                            "<<endl;
  cout<<"|_________________________________________________________________________"<<endl;

  ofstream outfile("E:\\E_ticket.txt");
        outfile<<"                           AIRLINE TICKET                                 "<<endl<<
   "|Ticket No."<<Ticket_No <<"                                Reference No."<<Reference_No<<"\t  "<<endl<<
      "|_________________________________________________________________________"<<endl<<
   "|Resevation No. :"<<Reservation_No<<"                                     "<<endl<<
   "|__________________________________________________________________________"<<endl<<
      "|Passenger Information :                                                  "<<endl<<
      "|Name :"<<Last_Name<<"/"<<First_Name<<"                                     "<<endl<<
      "|                                                                         "<<endl<<
      "|Address :"<<Address<<"                                                   "<<endl<<
      "|_________________________________________________________________________"<<endl<<
         "|flight Information :                                                     "<<endl<<
      "|12 aug 2011                                                              "<<endl<<
      "|BOING 747                                                                "<<endl<<
      "|_________________________________________________________________________"<<endl<<
      "|Depart :"<<Current_Location<<"                                                      "<<endl<<
      "|Arrive :"<<Destination<<"                                                       "<<endl<<
      "|*BAGGAGE allowed 40 Kilos                                                "<<endl<<
      "|*contact Airline to Confirm baggage allowance                            "<<endl<<
      "|_________________________________________________________________________"<<endl;

Ticket_No=Ticket_No+1;
Reference_No= Reference_No +1;

 }
};

class search
{
public:
void searching()
 {
  cout<<"FOLLOWING ARE THE INTERNATIONAL FLIGHTS AVAILABLE"<<endl;

  for(int i=0;i<5;i++)

  {

  for(int j=0;j<10;j++)

  {

   cout<<"FLIGHT FROM "<<Local_Destinationination[i]<<" TO "<<International_Destinationination[j]<<endl;
  }
  }
  }
};
class local: public booking
{
protected:
    int Business_Seat;
 int Economy_Seat;
 int ch;
 int k;
 int p;
 int Option;
 Flight_Time t1;
public:
 void getdata()
 {
  k=0;
  p=0;
  cout<<"In which AIRLINE you want to travel"<<endl<<endl;
  cout<<"1)PIA"<<endl;
  cout<<"2)AIR BLUE"<<endl;
  cout<<"3)ARAB EMIRATES"<<endl;
  cout<<"4)QATAR AIRWAYS"<<endl;
  cout<<"enter your choice"<<endl;;
  cin>>Option;
  system ("cls");
  switch(Option)
  {
  case 1:
   if (Option==1)
    cout<<setw(40)<<"\n\n\n                                WELCOME TO PIA"<<endl;
   break;
  case 2:
   if(Option==2)
    cout<<setw(40)<<"\n\n\n                                WELCOME TO AIRBLUE"<<endl;
   break;
  case 3:
   if(Option==3)
    cout<<setw(40)<<"\n\n\n                                WELCOME TO ARAB EMIRATES"<<endl;
   break;
  case 4:
   if(Option==4)
    cout<<setw(40)<<"\n\n\n                                WELCOME TO QATAR AIRWAYS"<<endl;
   break;
  }
  cout<<setw(40)<<"\nTHESE ARE THE LOCAL PLACES AVAILABLE\n\n\n"<<endl;
  cin.ignore();
  for(int i=0;i<5;i++)
  {
   cout<<Local_Destinationination[i]<<endl;
  }
  booking::getdata();
  for(int j=0;j<5;j++)
  {
   if(strcmp(Local_Destinationination[j],Current_Location)==0)
   {
    k++;
   }

  }
  for( int i=0;i<5;i++)
  {
   if(strcmp(Local_Destinationination[i],Current_Location)==0)

   {

    p++;

   }

  }
  if(k==1&&p==1)

  {

   cout<<" FLIGHT AVAILABLE ON THIS ROUTE"<<endl;

   Business_Seat=30;

   Economy_Seat=40;

   cout<<"In which class you want to travel?"<<endl;

   cout<<"Make your choice"<<endl<<endl;

   cout<<"\n\n\n\n\n\n";

  cout<<setw(60)<<"*************************************"<<endl;
        cout<<setw(60)<<"*     Press 1 for buisness class    *"<<endl;
  cout<<setw(60)<<"*     Press 2 for economy class     *"<<endl;
  cout<<setw(60)<<"*************************************"<<endl<<endl<<endl<<endl;

   cout<<"Enter your choice"<<endl;

   cin>>ch;

   cout<<endl;
   switch(ch)

   {

   case 1:

    Business_Seat--;

    if(Business_Seat<=0)

     cout<<"SORRY NO SEAT AVAILABLE"<<endl;

    else

     cout<<"SEAT AVAILABLE"<<endl;

    break;

   case 2:

    Economy_Seat--;

    if(Economy_Seat<=0)

     cout<<"SORRY NO SEAT AVAILABLE"<<endl;

    else

     cout<<"SEAT AVAILABLE"<<endl;

    break;

   }
   t1.getdata();

   system("CLS");
   booking::show();
   if(ch==1)

   {

    cout<<"|                                                                         "<<endl;
    cout<<"|Ticket Information:                                                      "<<endl;
    cout<<"|BUISNESS CLASS                                                           "<<endl;

    ofstream outfile;
    outfile.open("E:\\E_ticket.txt",ios::app);
    outfile<<"|                                                                         "<<endl<<
             "|Ticket Information:                                                      "<<endl<<
             "|BUISNESS CLASS                                                           "<<endl;

   }

   if(ch==2)

   {

    cout<<"|                                                                         "<<endl;
    cout<<"|Ticket Information:                                                      "<<endl;
    cout<<"|ECONOMY CLASS                                                            "<<endl;

    ofstream outfile;
    outfile.open("E:\\E_ticket.txt",ios::app);
    outfile<<"|                                                                         "<<endl<<
             "|Ticket Information:                                                      "<<endl<<
             "|ECONOMY CLASS                                                           "<<endl;
   }

       cout<<"|Status: confirmed                                                        "<<endl;

    ofstream outfile;
    outfile.open("E:\\E_ticket.txt",ios::app);
    outfile<<"|Status: confirmed                                                        "<<endl;
    t1.show();
  }
  else

  {
    cout<<"__________________________________________________________________________"<<endl;
     cout<<"|     SORRY NO FLIGHT AVAILABLE ON THIS ROUTE RIGHT NOW                   "<<endl;
    cout<<"__________________________________________________________________________"<<endl;

  }
}
 };

 class international:public booking

 {

 protected:

  int Business1_seat;

  int Economy1_seat;

  int choice;

  int c;

  int b;

  int v;

  char g;

     Flight_Time t1;


 public:


  void getdata()

  {

   b=0;

   v=0;

        cout<<"In which AIRLINE you want to travel"<<endl<<endl;
  cout<<"1)PIA"<<endl;
  cout<<"2)AIR BLUE"<<endl;
  cout<<"3)ARAB EMIRATES"<<endl;
  cout<<"4)QATAR AIRWAYS"<<endl;
  cout<<"enter your choice"<<endl;;
  cin>>Option;

  system ("cls");

  switch(Option)
  {
  case 1:
   if (Option==1)
    cout<<setw(40)<<"\n\n\n                                WELCOME TO PIA"<<endl;
   break;
  case 2:
   if(Option==2)
    cout<<setw(40)<<"\n\n\n                                WELCOME TO AIRBLUE"<<endl;
   break;
  case 3:
   if(Option==3)
    cout<<setw(40)<<"\n\n\n                                WELCOME TO ARAB EMIRATES"<<endl;
   break;
  case 4:
   if(Option==4)
    cout<<setw(40)<<"\n\n\n                                WELCOME TO QATAR AIRWAYS"<<endl;
   break;
  }
   cout<<"\n\nTHESE ARE THE INTERNATIONAL PLACES AVAILABLE"<<endl<<endl;
   cin.ignore();

   for(int i=0;i<10;i++)

   {

    cout<<International_Destinationination[i]<<endl;

   }


   booking::getdata();

   for(int j=0;j<10;j++)

   {


    if(strcmp(International_Destinationination[j],Destination)==0)

    {

     v++;

    }

   }
   for( int i=0;i<5;i++)

   {


    if(strcmp(Local_Destinationination[i],Current_Location)==0)


    {

     b++;

    }


   }
   if(b==1&&v==1)

   {

    cout<<" FLIGHT AVAILABLE ON THIS ROUTE"<<endl;

    Business1_seat=30;

    Economy1_seat=40;

    cout<<"In which class you want to travel?"<<endl;


    cout<<"Make your choice"<<endl<<endl;


    cout<<"\n\n\n\n\n\n";

  cout<<setw(60)<<"*************************************"<<endl;
        cout<<setw(60)<<"*     Press 1 for buisness class    *"<<endl;
  cout<<setw(60)<<"*     Press 2 for economy class     *"<<endl;
  cout<<setw(60)<<"*************************************"<<endl<<endl<<endl<<endl;

  cout<<"Enter your choice"<<endl;

  cin>>choice;

  cout<<endl;

  switch(choice)

  {


  case 1:

   Business1_seat--;

   if(Business1_seat<=0)

    cout<<"SORRY NO SEAT AVAILABLE"<<endl;

   else

    cout<<"SEAT AVAILABLE"<<endl;

   break;

  case 2:

   Economy1_seat--;

   if(Economy1_seat<=0)

    cout<<"SORRY NO SEAT AVAILABLE"<<endl;

   else

    cout<<"SEAT AVAILABLE"<<endl;

   break;

  }

  t1.getdata();



  system("CLS");


  booking::show();

  if(choice==1)

  {

    cout<<"|                                                                         "<<endl;
    cout<<"|Ticket Information:                                                      "<<endl;
    cout<<"|BUISNESS CLASS                                                           "<<endl;

    ofstream outfile;
    outfile.open("E:\\E_ticket.txt",ios::app);
    outfile<<"|                                                                         "<<endl<<
             "|Ticket Information:                                                      "<<endl<<
             "|BUSINESS CLASS                                                           "<<endl;

  }

  if(choice==2)

  {

    cout<<"|                                                                         "<<endl;
    cout<<"|Ticket Information:                                                      "<<endl;
    cout<<"|ECONOMY CLASS                                                           "<<endl;

    ofstream outfile;
    outfile.open("E:\\E_ticket.txt",ios::app);
    outfile<<"|                                                                         "<<endl<<
             "|Ticket Information:                                                      "<<endl<<
             "|ECONOMY CLASS                                                           "<<endl;

  }

  cout<<"|Status: confirmed                                                        "<<endl;

  ofstream outfile;
    outfile.open("E:\\E_ticket.txt",ios::app);
    outfile<<"|Status: confirmed                                                        "<<endl;

  t1.show();
   }
   else

   {
    cout<<"__________________________________________________________________________"<<endl;
     cout<<"|     SORRY NO FLIGHT AVAILABLE ON THIS ROUTE RIGHT NOW                   "<<endl;
   cout<<"__________________________________________________________________________"<<endl;

   }
}
 };

 class main_menu

 {
 private:
  int menu_choice;
 public:
void getdata()
{
m:
   cout<<"\n\n\n\n\n\n";
   cout<<setw(60)<<"*************************************"<<endl;
   cout<<setw(60)<<"*        AIRWAYS RESERVATION        *"<<endl;
   cout<<setw(60)<<"*             MAIN MENU             *"<<endl;
   cout<<setw(60)<<"*        ENTER YOUR CHOICE          *"<<endl;
   cout<<setw(60)<<"*   PRESS 1 FOR LOCAL BOOKING       *"<<endl;
   cout<<setw(60)<<"* PRESS 2 FOR INTERNATIONAL BOOKING *"<<endl;
   cout<<setw(60)<<"*   PRESS 3 FOR SEARCH OF FLIGHTS   *"<<endl;
   cout<<setw(60)<<"*       NOW ENTER YOUR CHOICE:      *"<<endl;
   cout<<setw(60)<<"*************************************"<<endl;

   cin>>menu_choice;

  system("cls");

   passenger* p1;

   booking b1;

   international i1;

   local l1;

   char back;


   switch(menu_choice)

   {

   case 1:


    p1=&l1;

    p1->getdata();

    cout<<"To Go To Main Menu Press b"<<endl;

    cin>>back;



    system("CLS");

    if (back=='b')

    {

     goto m;

    }

    else

    {

     cout<<"\n\n\n\n\n\n";

     cout<<setw(40)<<"BYE FROM AIR RESERVATION SYSTEM";

    }


    break;

   case 2:


    p1=&i1;

    p1->getdata();

    cout<<"To Go To Main Menu Press b"<<endl;

    cin>>back;


    system("CLS");

    if (back=='b')

    {

     goto m;

    }

    else

    {

     cout<<"\n\n\n\n\n\n";

     cout<<setw(40)<<"BYE FROM AIR RESERVATION SYSTEM";

    }

    break;

   case 3:

    search s1;

    s1.searching();

    cout<<"To Go To Main Menu Press b"<<endl;

    cin>>back;



    system("CLS");

    if (back=='b')

    {

     goto m;

    }

    else

    {

     cout<<"\n\n\n\n\n\n";

     cout<<setw(40)<<"BYE FROM AIR RESERVATION SYSTEM";

    }

    break;

}
}
};
int main()
{ SetConsoleTitle("AIRWAYS RESERVATION");
 system("color 5f");
 cout<<"\n\n\n\n\n\n\n\n\n\n\t\t     WELCOME TO AIRWAYS RESERVATION SYSTEM";
 Sleep(2500);
 system ("cls");
 cout<<"\n\n\n\n\n\n\n\t\t          Developed by :";
 Sleep(500);
  cout<<" RANA ARYAN KHAN";
  Sleep(500);
  cout<<"\n\n\n\t\t                        USAMA ZAHEER ";
 Sleep(3000);
 system("cls");
 main_menu m1;
 m1.getdata();
}

Read More →

| 0 comments ]

This is our final Project of Object Oriented Programming, Developed by Ubaidullah Hassan and Muhammad Hamza Asif, you can use this project as a reference project to handle your issues while you are learning OOP in bachelors/masters, for help you can leave as email on techarenapk@gmail.com , we'll try to reply your queries as soon as possible.

The Code is as follow




#include<iostream>
#include<fstream>
#include<cctype>
#include<iomanip>
using namespace std;
int InitialNumber=2016000;
int GenerateAccount()
{
return InitialNumber+=1;
}
class account
{
int accountno;
char name[50];
int depositCash;
char Accounttype;
public:
void create_account();
void show_account() const;
void modify();
void deposit(int);
void draw(int);
void report() const;
int returnaccountno() const;
int returndeposit() const;
char returntype() const;
};
void account::create_account()
{
std::cout<<"\n\nEnter The Name of The account Holder : ";
std::cin.ignore();
std::cin.getline(name,50);
std::cout<<"\nEnter Type of The account (C/S) : ";
std::cin>>Accounttype;
Accounttype=toupper(Accounttype);
std::cout<<"\nEnter The Initial amount : ";
std::cin>>depositCash;
accountno=GenerateAccount();
cout<<"\nYour Account Number is :"<<accountno;
std::cout<<"\n\n\nAccount Created..";
}
void account::show_account() const
{
std::cout<<"\nAccount No. : "<<accountno;
std::cout<<"\nAccount Holder Name : ";
std::cout<<name;
std::cout<<"\nType of Account : "<<Accounttype;
std::cout<<"\nBalance amount : "<<depositCash;
}
void account::modify()
{
std::cout<<"\nAccount No. : "<<accountno;
std::cout<<"\nModify Account Holder Name : ";
std::cin.ignore();
std::cin.getline(name,50);
std::cout<<"\nModify Type of Account : ";
std::cin>>Accounttype;
Accounttype=toupper(Accounttype);
std::cout<<"\nModify Balance amount : ";
std::cin>>depositCash;
}

void account::deposit(int x)
{
depositCash+=x;
}

void account::draw(int x)
{
depositCash-=x;
}
void account::report() const
{
std::cout<<accountno<<setw(10)<<" "<<name<<setw(10)<<" "<<Accounttype<<setw(6)<<depositCash<<endl;
}
char account::returntype() const
{
return Accounttype;
}
int account::returnaccountno() const
{
return accountno;
}
int account::returndeposit() const
{
return depositCash;
}
class functions: public account
{
public:
void write_account()
{
account ac;
ofstream outFile;
outFile.open("account.dat",ios::binary|ios::app);
ac.create_account();
outFile.write(reinterpret_cast<char *> (&ac), sizeof(account));
outFile.close();
}
void display_sp(int n)
{
account ac;
bool flag=false;
ifstream inFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
{
std::cout<<"File could not be open !! Press any Key...";
return;
}
std::cout<<"\nBALANCE DETAILS\n";
    while(inFile.read(reinterpret_cast<char *> (&ac), sizeof(account)))
{
if(ac.returnaccountno()==n)
{
ac.show_account();
flag=true;
}
}
inFile.close();
if(flag==false)
std::cout<<"\n\nAccount number does not exist";
}
void modify_account(int n)
{
bool found=false;
account ac;
fstream File;
File.open("account.dat",ios::binary|ios::in|ios::out);
if(!File)
{
std::cout<<"File could not be open !! Press any Key...";
return;
}
while(!File.eof() && found==false)
{
File.read(reinterpret_cast<char *> (&ac), sizeof(account));
if(ac.returnaccountno()==n)
{
ac.show_account();
std::cout<<"\n\nEnter The New Details of account"<<endl;
ac.modify();
int pos=(-1)*static_cast<int>(sizeof(account));
File.seekp(pos,ios::cur);
File.write(reinterpret_cast<char *> (&ac), sizeof(account));
std::cout<<"\n\n\t Record Updated";
found=true;
 }
}
File.close();
if(found==false)
std::cout<<"\n\n Record Not Found ";
}
void delete_account(int n)
{
account ac;
ifstream inFile;
ofstream outFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
{
std::cout<<"File could not be open !! Press any Key...";
return;
}
outFile.open("Temp.dat",ios::binary);
inFile.seekg(0,ios::beg);
while(inFile.read(reinterpret_cast<char *> (&ac), sizeof(account)))
{
if(ac.returnaccountno()!=n)
{
outFile.write(reinterpret_cast<char *> (&ac), sizeof(account));
}
}
inFile.close();
outFile.close();
remove("account.dat");
std::rename("Temp.dat","account.dat");
std::cout<<"\n\n\tRecord Deleted ..";
}
void display_all()
{
account ac;
ifstream inFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
{
std::cout<<"File could not be open !! Press any Key...";
return;
}
std::cout<<"\n\n\t\tACCOUNT HOLDER LIST\n\n";
std::cout<<"====================================================\n";
std::cout<<"A/c no.      NAME           Type  Balance\n";
std::cout<<"====================================================\n";
while(inFile.read(reinterpret_cast<char *> (&ac), sizeof(account)))
{
ac.report();
}
inFile.close();
}
void deposit_withdraw(int n, int option)
{
int amt;
bool found=false;
account ac;
fstream File;
File.open("account.dat", ios::binary|ios::in|ios::out);
if(!File)
{
std::cout<<"File could not be open !! Press any Key...";
return;
}
while(!File.eof() && found==false)
{
File.read(reinterpret_cast<char *> (&ac), sizeof(account));
if(ac.returnaccountno()==n)
{
ac.show_account();
if(option==1)
{
std::cout<<"\n\n\tTO DEPOSITE AMOUNT ";
std::cout<<"\n\nEnter The amount to be deposited";
std::cin>>amt;
ac.deposit(amt);
}
if(option==2)
{
std::cout<<"\n\n\tTO WITHDRAW AMOUNT ";
std::cout<<"\n\nEnter The amount to be withdraw";
std::cin>>amt;
int bal=ac.returndeposit()-amt;
if((bal<500 && ac.returntype()=='S') || (bal<1000 && ac.returntype()=='C'))
std::cout<<"Insufficience balance";
else
ac.draw(amt);
}
int pos=(-1)*static_cast<int>(sizeof(ac));
File.seekp(pos,ios::cur);
File.write(reinterpret_cast<char *> (&ac), sizeof(account));
std::cout<<"\n\n\t Record Updated";
found=true;
      }
         }
File.close();
if(found==false)
std::cout<<"\n\n Record Not Found ";
}
};
class menu:public account,public functions
{
protected:
int ch,num;
public:
void mainScreen()
{
do
{
system("cls");
std::cout<<"__________SELECT ROLE_________";
std::cout<<"\n\n01 : Manager";
std::cout<<"\n\n02 : Teller";
std::cout<<"\n\n03 : Accountant";
std::cin>>ch;
system("cls");
switch (ch)
{
case 1:
ManagerMenu();
break;
case 2:
TellerMenu();
break;
case 3:
AccountantMenu();
break;
case 4:
std::cout<<"\n\n\tThanks for using bank managemnt system";
break;
default :std::cout<<"\a";
}
std::cin.ignore();
std::cin.get();
}while(ch!=4);
}
void AccountantMenu()
{
do{
system("cls");
std::cout<<"\n\n\t01. NEW ACCOUNT";
std::cout<<"\n\n\t02. ALL ACCOUNT HOLDER LIST";
std::cout<<"\n\n\t03. CLOSE AN ACCOUNT";
std::cout<<"\n\n\t04. MODIFY AN ACCOUNT";
std::cout<<"\n\n\t05. EXIT";
std::cout<<"\n\n\tSelect Your Option (1-5) ";
std::cin>>ch;
system("cls");
switch (ch)
{
case 1:
write_account();
break;
case 2:
display_all();
break;
case 3:
std::cout<<"\n\n\tEnter The account No. : ";
std::cin>>num;
delete_account(num);
case 4:
std::cout<<"\n\n\tEnter The account No. : ";
std::cin>>num;
modify_account(num);
case 5:
std::cout<<"\n\n\tThanks for using bank managemnt system";
break;
deafult :std::cout<<"\a";
}
std::cin.ignore();
std::cin.get();
}while(ch!=5);
}
void TellerMenu()
{
do{
system("cls");
std::cout<<"\n\n\t01. DEPOSIT AMOUNT";
std::cout<<"\n\n\t02. WITHDRAW AMOUNT";
std::cout<<"\n\n\t03. BALANCE ENQUIRY";
std::cout<<"\n\n\t04. ALL ACCOUNT HOLDER LIST";
std::cout<<"\n\n\t05. EXIT";
std::cout<<"\n\n\tSelect Your Option (1-5) ";
std::cin>>ch;
system("cls");
switch (ch)
{
case 1:
std::cout<<"\n\n\tEnter The account No. : ";
std::cin>>num;
deposit_withdraw(num, 1);
break;
case 2:
std::cout<<"\n\n\tEnter The account No. : ";
std::cin>>num;
deposit_withdraw(num, 2);
break;
case 3:
std::cout<<"\n\n\tEnter The account No. : ";
std::cin>>num;
display_sp(num);
break;
case 4:
display_all();
break;
case 5:
std::cout<<"\n\n\tThanks for using bank managemnt system";
break;
default :std::cout<<"\a";
}
std::cin.ignore();
std::cin.get();
}while(ch!=5);

}
void ManagerMenu()
{
do
{
system("cls");
std::cout<<"\n\n\n\tMAIN MENU";
std::cout<<"\n\n\t01. NEW ACCOUNT";
std::cout<<"\n\n\t02. DEPOSIT AMOUNT";
std::cout<<"\n\n\t03. WITHDRAW AMOUNT";
std::cout<<"\n\n\t04. BALANCE ENQUIRY";
std::cout<<"\n\n\t05. ALL ACCOUNT HOLDER LIST";
std::cout<<"\n\n\t06. CLOSE AN ACCOUNT";
std::cout<<"\n\n\t07. MODIFY AN ACCOUNT";
std::cout<<"\n\n\t08. EXIT";
std::cout<<"\n\n\tSelect Your Option (1-8) ";
std::cin>>ch;
system("cls");
switch(ch)
{
case 1:
write_account();
break;
case 2:
std::cout<<"\n\n\tEnter The account No. : ";
std::cin>>num;
deposit_withdraw(num, 1);
break;
case 3:
std::cout<<"\n\n\tEnter The account No. : ";
std::cin>>num;
deposit_withdraw(num, 2);
break;
case 4:
std::cout<<"\n\n\tEnter The account No. : ";
std::cin>>num;
display_sp(num);
break;
case 5:
display_all();
break;
case 6:
std::cout<<"\n\n\tEnter The account No. : ";
std::cin>>num;
delete_account(num);
break;
case 7:
std::cout<<"\n\n\tEnter The account No. : ";
std::cin>>num;
modify_account(num);
break;
case 8:
std::cout<<"\n\n\tThanks for using bank managemnt system";
break;
default :std::cout<<"\a";
}
std::cin.ignore();
std::cin.get();
}while(ch!=8);

}
};
void intro();
int num;
int main()
{
int num;
intro();
menu m;
m.mainScreen();
return 0;
}
void intro()
{
std::cout<<"\n\n\n\t  BANK";
std::cout<<"\n\n\tMANAGEMENT";
std::cout<<"\n\n\t  SYSTEM";
std::cout<<"\n\n\n\nMADE BY : Ubaidullah Hassan & HAmza Asif";
std::cin.get();
}
Read More →

| 0 comments ]



Read More →

| 1 comments ]

Access Magento Static Block From a PHP Template File




 $block = Mage::getSingleton('core/layout')->createBlock('cms/block')->setBlockId('block-id-in-magento');
 echo $block->toHtml();

?>


Add a Static Block to the CMS Page Content Field


{{block type="cms/block" block_id="block-id-in-magento"}}

Adding a Static Block to the CMS Page Layout Update XML FIeld


reference name="content">
  <block type="cms/block" name="block.name">
    <action method="setBlockId"><block_id>block-id-in-magentoblock_id>action>
  block>
reference>

Read More →

| 2 comments ]

There are times when you want to display widgets on other locations than your default sidebar. With such high demand for this hack, we will be sharing how you can create multiple dynamic sidebars that are widget ready for your WordPress blog. There are some plugins that will require you to use the widget only, or in some cases widget is what you feel comfortable with then this is the hack for you.

For this we need to add the following code to PHP /html editor in html mode which will generate the orignal code and then copypaste it in functions.php
&lt;?php
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' =&gt; '
Left Sidebar',
'before_widget' =&gt; '',
'after_widget' =&gt; '',
'before_title' =&gt; '&lt;h2&gt;',
'after_title' =&gt; '&lt;/h2&gt;',
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' =&gt; 'Right Sidebar',
'before_widget' =&gt; '',
'after_widget' =&gt; '',
'before_title' =&gt; '&lt;h2&gt;',
'after_title' =&gt; '&lt;/h2&gt;',
));
?&gt; 

Now Use this Snippet to get it on any site
&lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(&quot;Left Sidebar&quot;) ) : ?&gt;Default left sidebar stuff here&acirc;&#65533;&brvbar;
&lt;?php endif; ?&gt;
Read More →

| 0 comments ]

I found this chart in a book and i wold to share this chart with people who are related with the production of Graphics and web material. Specially it would be a great source for the web developer. It converts points to pixels, EMS and Percentages. It's an approximation, which will depend on font, browser and OS, but it's a good starting point. Now you don't need to remember the conversion units all the time
Read More →

 
http://www.tsfaenterprise.com TSFA ENTERPRISE TSFA GAS OVEN AND HOME APPLIANCE IN PAKISTAN GAS OVEN GAS OVEN in pakistan Pakistan Home Appliance http://gasovenandhomeappliancesinpakistan.com/ TSFA ENTERPRISE TSFA GAS OVEN AND HOME APPLIANCE IN PAKISTAN GAS OVEN GAS OVEN in pakistan Pakistan Home Appliance