Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // license.cpp : Defines the entry point for the console application.
- //
- #include <stdafx.h>
- #include <iostream>
- #include <string>
- #include <fstream>
- #include <sstream>
- #include <list>
- #include "new"
- using namespace std;
- class license{
- protected:
- string owner_remark;
- string name;
- string valid_from;
- string valid_till;
- string license_num;
- public:
- friend class company;
- string get_License_num(){
- return license_num;
- }
- //Copy constructor needed.......................................
- license(string as_name,string as_valid_from,string as_valid_till,string as_license_num, string as_owner_remark){
- owner_remark=as_owner_remark; //
- name=as_name;
- valid_from=as_valid_from;
- valid_till=as_valid_till; //
- license_num=as_license_num;}
- void print_license(){
- cout<<"These information is for the LICENSE of the below metioned bearer:"<<endl;
- cout<<"Names:"<<" "<<name<<endl;
- cout<<"Licence remarks:"<<" "<<owner_remark<<endl;
- cout<<"Valid from:"<<" "<<valid_from<<endl;
- cout<<"Valid Till:"<<" "<<valid_till<<endl;
- cout<<"Licence Number:"<<" "<<license_num<<endl;}
- };
- class d_license: public license {
- private:
- friend class company;
- string date_of_birth;
- string license_class;
- string passport_num;
- string city;
- string vehicle_type;
- string surname;
- public:
- int get_d_license();// Not used yet
- // copy constructors needed.
- d_license(string as_surname,string as_date_of_birth,string as_license_class, string as_passport_num,
- string as_city,string as_vehicle_type,string as_name,string as_valid_from,string as_valid_till,
- string as_license_num, string as_owner_remark)
- :license( as_name, as_valid_from,as_valid_till,as_license_num,as_owner_remark){
- surname=as_surname;
- date_of_birth=as_date_of_birth;
- license_class=as_license_class;
- passport_num=as_passport_num;
- city=as_city;
- vehicle_type=as_vehicle_type;}
- void print_license(){
- cout<<"These information is for the DRIVING LICENSE of the below metioned bearer:"<<endl;
- cout<<"Name:"<<" "<<name<<endl;
- cout<<"Surname:"<<" "<<surname<<endl;
- cout<<"Date of birth:"<<" "<<date_of_birth<<endl;
- cout<<"Licence class:"<<" "<<license_class<<endl;
- cout<<"Passport Number:"<<" "<<passport_num<<endl;
- cout<<"City:"<<" "<<city<<endl;
- cout<<"Vehicle Type:"<<" "<<vehicle_type<<endl;
- cout<<"Licence remarks:"<<" "<<owner_remark<<endl;
- cout<<"Valid from:"<<" "<<valid_from<<endl;
- cout<<"Valid Till:"<<" "<<valid_till<<endl;
- cout<<"Licence Number:"<<" "<<license_num<<endl;
- }
- };
- class business_license:public license{
- private:
- friend class company;
- string location;
- string remark;
- string category;
- public:
- int get_business_license();
- business_license(string as_location,string as_remark,string as_category,string as_name,string as_valid_from,
- string as_valid_till,string as_license_num, string as_owner_remark)
- :license(as_name, as_valid_from,as_valid_till,as_license_num,as_owner_remark){
- location=as_location;
- remark=as_remark;
- category=as_category;
- }
- void print_license(){
- cout<<"Name:"<<" "<<name<<endl;
- cout<<"Licence remarks:"<<" "<<owner_remark<<endl;
- cout<<"Valid from:"<<" "<<valid_from<<endl;
- cout<<"Valid Till:"<<" "<<valid_till<<endl;
- cout<<"Licence Number:"<<" "<<license_num<<endl;
- cout<<"Location:"<<" "<<location<<endl;
- cout<<"Remark:"<<" "<<remark<<endl;
- cout<<"category:"<<" "<<category<<endl;
- }
- };
- class animal_license : public license{
- private:
- friend class company;
- string district;
- string animal_type;
- public:
- int get_animal_license();
- animal_license(string as_district,string as_animal_type, string as_name,string as_valid_from,string as_valid_till,
- string as_license_num, string as_owner_remark)
- :license(as_name, as_valid_from,as_valid_till,as_license_num,as_owner_remark){
- district=as_district;
- animal_type=as_animal_type;
- }
- void print_license(){
- cout<<"Name:"<<" "<<name<<endl;
- cout<<"Licence remarks:"<<" "<<owner_remark<<endl;
- cout<<"Valid from:"<<" "<<valid_from<<endl;
- cout<<"Valid Till:"<<" "<<valid_till<<endl;
- cout<<"Licence Number:"<<" "<<license_num<<endl;
- cout<<"District:"<<" "<<district<<endl;
- cout<<"Type of Animal:"<<" "<<animal_type<<endl;}
- };
- class company{
- private:
- list<license*>general;
- list<license*>::iterator l;
- list<d_license*>vehicle;
- list<d_license*>::iterator v;
- list<business_license*>business;
- list<business_license*>::iterator b;
- list<animal_license*>animal;
- list<animal_license*>::iterator a;
- public:
- //operators that add/removes objects to/from the list
- void operator+(license &licen){
- general.push_back(&licen);
- return;}
- void operator+(d_license &vehi){
- vehicle.push_back(&vehi);
- return;}
- void operator+(business_license &lic){
- business.push_back(&lic);
- return;
- }
- void operator+(animal_license &anim){
- animal.push_back(&anim);
- return;
- }
- //////////////////////////////////////////////////////////////////////////////////////////////
- /*
- void operator-(animal_license &anim){
- animal.erase(&anim);
- return;
- }
- */
- ///////////////////////////////////////////////////////////////////////////
- //Methods dispaly
- void display_license(){
- cout<<"Total #:"<<general.size()<<endl;
- int i=1;
- l=general.begin();
- while(l!=general.end()){
- cout<<i<<")"<<endl;
- (*l)->print_license();
- cout<<endl;
- i+=1;
- l++;}
- return;}
- void display_d_license(){
- int i=1;
- cout<<"Total #:"<<vehicle.size()<<endl;
- v=vehicle.begin();
- while(v!=vehicle.end()){
- cout<<i<<")"<<endl;
- (*v)->print_license();
- cout<<endl;
- i+=1;
- v++;
- }
- return;}
- void display_business_license(){
- int i=1;
- cout<<"Total #:"<<business.size()<<endl;
- b=business.begin();
- while(b!=business.end()){
- cout<<i<<")"<<endl;
- (*b)->print_license();
- cout<<endl;
- i+=1;
- b++;
- }
- return;}
- void display_animal_license(){
- int i=1;
- cout<<"Total #:"<<animal.size()<<endl;
- //if(animal.size()!=0){
- a=animal.begin();
- while(a!=animal.end()){
- cout<<i<<")"<<endl;
- (*a)->print_license();
- cout<<endl;
- i+=1;
- a++;
- }
- //}
- return;}
- //Methods search.
- void search_license(string alf){
- if((general.size())!=0){
- l=general.begin();
- while(l!=general.end()){
- //cout<<(*l)->license_num<<" is "<<alf<<endl;//////////////////////////////////////
- if((*l)->license_num==alf){
- (*l)->print_license();
- return;}
- l++;
- }}
- cout<<"Sorry, there is no such License number as "<<" '"<<alf<<"' "<<"registered in our database"<<endl;
- }
- void search_d_license(string alf){
- if((vehicle.size())!=0){
- v=vehicle.begin();
- while(v!=vehicle.end()){
- if((*v)->license_num==alf){
- (*v)->print_license();
- return;}
- v++;
- }}
- cout<<"Sorry, there is no such License number as "<<" '"<<alf<<"' "<<"registered in our database"<<endl;
- }
- void search_business_license(string alf){
- if((business.size())!=0){
- b=business.begin();
- while(b!=business.end()){
- if((*b)->license_num==alf){
- (*b)->print_license();
- return;}
- b++;
- }}
- cout<<"Sorry, there is no such License number as "<<" '"<<alf<<"' "<<"registered in our database"<<endl;
- }
- void search_animal_license(string alf){
- if((animal.size())!=0){
- a=animal.begin();
- while(a!=animal.end()){
- if((*a)->license_num==alf){
- (*a)->print_license();
- return;}
- a++;
- }}
- cout<<"Sorry, there is no such License number as "<<" '"<<alf<<"' "<<"registered in our database"<<endl;
- }
- //method remove
- void remove_license(string alf){
- if((general.size())!=0){
- l=general.begin();
- while(l!=general.end()){
- if((*l)->license_num==alf){
- general.remove(*l);
- return;}
- l++;
- }}
- cout<<"Sorry, the document with license#:"<<alf<<" can not be deleted because it doesn't exist"<<endl;
- }
- void remove_d_license(string alf){
- if((vehicle.size())!=0){
- v=vehicle.begin();
- while(v!=vehicle.end()){
- if((*v)->license_num==alf){
- vehicle.remove(*v);
- return;}
- v++;
- }}
- cout<<"Sorry, the document with license#:"<<alf<<" can not be deleted because it doesn't exist"<<endl;
- }
- void remove_business_license(string alf){
- if((business.size())!=0){
- b=business.begin();
- while(b!=business.end()){
- if((*b)->license_num==alf){
- business.remove(*b);
- return;}
- b++;
- }}
- cout<<"Sorry, the document with license#:"<<alf<<" can not be deleted because it doesn't exist"<<endl;
- }
- void remove_animal_license(string alf){
- if((animal.size())!=0){
- a=animal.begin();
- while(a!=animal.end()){
- if((*a)->license_num==alf){
- animal.remove(*a);
- return;}
- a++;
- }}
- cout<<"Sorry, the document with license#:"<<alf<<" can not be deleted because it doesn't exist"<<endl;
- }
- void save_license(ofstream &license){
- l=general.begin();
- while(l!=general.end()){
- license<<(*l)->name<<' '<<(*l)->valid_from<<' '<<(*l)->valid_till<<' '<<(*l)->license_num<<' '<<(*l)->owner_remark<<endl;
- l++;}
- }
- void save_business_license(ofstream &business_license){
- b=business.begin();
- while(b!=business.end()){
- business_license<<(*b)-> location<<' '<< (*b)->remark<<' '<< (*b)->category<<' '<<(*b)->name<<' '<<(*b)->valid_from<<' '<<(*b)->valid_till<<' '<<(*b)->license_num<<' '<<(*b)->owner_remark<<endl;
- b++;}
- }
- void save_d_license(ofstream &d_license){
- v=vehicle.begin();
- while(v!=vehicle.end()){
- d_license<<(*v)->surname<<' '<< (*v)->date_of_birth<<' '<<(*v)->license_class<<' '<<(*v)->passport_num<<' '<<(*v)->city<<' '<<(*v)->vehicle_type<<' '<<(*v)->name<<' '<<(*v)->valid_from<<' '<<(*v)->valid_till<<' '<<(*v)->license_num<<' '<<(*v)->owner_remark<<endl;
- v++;}
- }
- void save_animal_license(ofstream &animal_license){
- a=animal.begin();
- while(a!=animal.end()){
- animal_license<<(*a)->district<<' '<<(*a)->animal_type<<' '<<(*a)->name<<' '<<(*a)->valid_from<<' '<<(*a)->valid_till<<' '<<(*a)->license_num<<' '<<(*a)->owner_remark<<endl;
- a++;}
- }
- };
- int main()
- {
- company folder;
- string name;
- string valid_from;
- string valid_till;
- string license_num;
- string owner_remark;
- string surname;
- string date_of_birth;
- string license_class;
- string passport_num;
- string city;
- string vehicle_type;
- string owner_name;
- string pet_name;
- string owner_location;
- string location;
- string remark;
- string category;
- string district;
- string animal_type;
- ifstream file2;//
- file2.open("licenses.txt");
- if(file2.is_open()){
- while(!(file2.eof()) ){
- getline(file2,name);
- getline(file2,valid_from);
- getline(file2,valid_till);
- getline(file2,license_num);
- getline(file2,owner_remark);
- license km(name,valid_from,valid_till,license_num,owner_remark);
- folder+km;
- file2.close();}}
- ifstream file3;//
- file3.open("vehicles.txt");
- if(file3.is_open()){
- while(!(file3.eof()) ){
- getline(file3,surname);
- getline(file3,date_of_birth);
- getline(file3,license_class);
- getline(file3,passport_num);
- getline(file3,city);
- getline(file3,vehicle_type);
- getline(file3,valid_from);
- getline(file3,valid_till);
- getline(file3,license_num);
- getline(file3,owner_remark);
- d_license kc( surname, date_of_birth,license_class,passport_num,city,vehicle_type,name,valid_from,valid_till,license_num,owner_remark);
- folder+kc;
- file3.close();}}
- ifstream file4;//
- file4.open("businesss.txt");
- if(file4.is_open()){
- while(!(file4.eof()) ){
- getline(file4,location);
- getline(file4,remark);
- getline(file4,category);
- getline(file4,name);
- getline(file4,valid_from);
- getline(file4,valid_till);
- getline(file4,license_num);
- getline(file4,owner_remark);
- business_license op( location, remark, category,name,valid_from,valid_till,license_num,owner_remark);;
- folder+op;
- file4.close();}}
- ifstream file5;//
- file5.open("animals.txt");
- if(file5.is_open()){
- while(!(file5.eof()) ){
- getline(file5,district);
- getline(file5,animal_type);
- getline(file5,name);
- getline(file5,valid_from);
- getline(file5,valid_till);
- getline(file5,license_num);
- getline(file5,owner_remark);
- animal_license zz(district,animal_type,name,valid_from,valid_till,license_num,owner_remark);
- folder+zz;
- file5.close();}}
- cout<<"Please correctly Enter license Number for the document( If you only want to view documents(Licenses) please exit this field with the Enter botton) :"<<endl;
- cout<<"Enter:";
- getline(cin,license_num);
- cout<<license_num<<endl;
- int q,w,e;
- cout<<"\t\t\t\t"<<"Welcome!!"<<endl<<endl;
- cout<<" What do you want to do now?:"<<endl;
- cout<<"1. Add a Document(Licenses)?::Enter '1' !!!!"<<endl;
- cout<<"2. Search for a document(Licenses)?::Enter '2' !!!!"<<endl;
- cout<<"3. Delete a document(Licenses)?::Enter '3' !!!!"<<endl;
- cout<<"4. View all documents(Licenses)?::Enter '4' !!!!"<<endl<<endl;
- cout<<"Enter:";
- cin>>q;
- cout<<endl<<endl;
- /*if(q==2 || q==3 || ){ VERY IMPORTANT
- cout<<"Please correctly Enter license Number for the document( If you only want to view documents(Licenses) please exit this field with the Enter botton) :"<<endl;
- cout<<"Enter:";
- getline(cin,license_num);
- cout<<license_num<<endl;}*/
- if(q==1){
- cout<<"What License?:"<<endl;
- cout<<"General License(s)::Enter '1' !!!"<<endl;
- cout<<"Business License(s)::Enter '2' !!!"<<endl;
- cout<<"Driving License(s)::Enter '3' !!!"<<endl;
- cout<<"Animal/pet License(s)::Enter '4' !!!"<<endl<<endl;
- cout<<"Enter:";
- cin>>w;
- while(w==1){
- cout<<"Fill these following fields:"<<endl<<endl;
- cout<<"Names(First name and last name):";
- getline(cin,name);
- if(getline(cin,name)==" " || name==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Issued date :";
- getline(cin,valid_from);
- if( valid_from==""){
- cout<<"Sorry this field is required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Expiry Date:";
- getline(cin,valid_till);
- if( valid_till==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"License Number:";
- getline(cin,license_num);
- if( name==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Remark for the bearer:";
- getline(cin,owner_remark);
- if( owner_remark==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl<<endl;
- cout<<"Name:"<<name<<endl;
- cout<<"Issued from:"<<valid_from<<endl;
- cout<<"Expiry date:"<<valid_till<<endl;
- cout<<"License Number:"<<license_num<<endl;
- cout<<"Remark for the bearer:"<<owner_remark<<endl;
- cout<<"Verify! If correct enter '1' else '0':";
- cin>>e;
- if(e==1){
- license on( name, valid_from,valid_till,license_num,owner_remark);
- folder + on;
- ofstream file1;
- file1.open("licenses.txt");
- folder.save_license(file1);
- file1.close();
- }
- else{
- continue;
- }
- break;
- }
- /////////////////////////////////////////
- while(w==3){
- cout<<"Fill these following fields:"<<endl<<endl;
- cout<<"Name:";
- getline(cin,name);
- if(getline(cin,name)==" " || name==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Surname:";
- getline(cin,surname);
- if( surname==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Date of Birth:";
- getline(cin,date_of_birth);
- if( date_of_birth==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"License class:";
- getline(cin,license_class);
- if( license_class==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Passport Number:";
- getline(cin,passport_num);
- if( passport_num==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"City:";
- getline(cin,city);
- if( city==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Vehicle Type:";
- getline(cin,vehicle_type);
- if( vehicle_type==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Issued date :";
- getline(cin,valid_from);
- if( valid_from==""){
- cout<<"Sorry this field is required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Expiry Date:";
- getline(cin,valid_till);
- if( valid_till==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"License Number:";
- getline(cin,license_num);
- if( name==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Remark for the bearer:";
- getline(cin,owner_remark);
- if( owner_remark==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl<<endl;
- cout<<"Name:"<<name<<endl;
- cout<<"Surname:"<<surname<<endl;
- cout<<"Date of birth:"<<date_of_birth<<endl;
- cout<<"License class:"<<license_class<<endl;
- cout<<"Passport Number:"<<passport_num<<endl;
- cout<<"City:"<<city<<endl;
- cout<<"Vehicle Type:"<<vehicle_type<<endl;
- cout<<"Issued from:"<<valid_from<<endl;
- cout<<"Expiry date:"<<valid_till<<endl;
- cout<<"License Number:"<<license_num<<endl;////////////////////
- cout<<"Remark for the bearer:"<<owner_remark<<endl;
- cout<<"Verify! If correct enter '1' else '0':";
- cin>>e;
- if(e==1){
- d_license k( surname, date_of_birth,license_class,passport_num,city,vehicle_type,name,valid_from,valid_till,license_num,owner_remark);////
- folder+k;
- ofstream file3;
- file3.open("vehicles.txt");
- folder.save_d_license(file3);
- file3.close();
- }
- else{
- continue;}
- break;
- }
- while(w==2){
- cout<<"Fill these following fields:"<<endl<<endl;
- cout<<"Company's name:";
- getline(cin,name);
- if(getline(cin,name)==" " || name==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Issued date :";
- getline(cin,valid_from);
- if( valid_from==""){
- cout<<"Sorry this field is required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Expiry Date:";
- getline(cin,valid_till);
- if( valid_till==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"License Number:";
- getline(cin,license_num);
- if( name==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Remark for the bearer:";
- getline(cin,owner_remark);
- if( owner_remark==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Location of Business:";
- getline(cin,location);
- if( location==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Companies Remark:";
- getline(cin,remark);
- if( remark==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Category of Business:";
- getline(cin,category);
- if( category==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl<<endl;
- cout<<"Name:"<<name<<endl;
- cout<<"Issued from:"<<valid_from<<endl;
- cout<<"Expiry date:"<<valid_till<<endl;
- cout<<"License Number:"<<license_num<<endl;
- cout<<"Remark for the bearer:"<<owner_remark<<endl;
- cout<<"Business Location:"<<location<<endl;
- cout<<"Company's Remark:"<<remark<<endl;
- cout<<"Category of Business:"<<category<<endl;
- cout<<"Verify! If correct enter '1' else '0':";
- cin>>e;
- if(e==1){
- business_license n( location, remark, category,name,valid_from,valid_till,license_num,owner_remark);
- folder + n;
- ofstream file4;
- file4.open("businesss.txt");
- folder.save_business_license(file4);
- file4.close();
- }
- else{
- continue;
- }
- break;
- }
- while(w==4){
- cout<<"Fill these following fields:"<<endl<<endl;
- cout<<"Animal's name:";
- getline(cin,name);
- if(getline(cin,name)==" " || name==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Issued date :";
- getline(cin,valid_from);
- if( valid_from==""){
- cout<<"Sorry this field is required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Expiry Date:";
- getline(cin,valid_till);
- if( valid_till==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"License Number:";
- getline(cin,license_num);
- if( name==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Remark for pet owner:";
- getline(cin,owner_remark);
- if( owner_remark==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"District:";
- getline(cin,district);
- if( district==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl;
- cout<<"Type of Animal/pet:";
- getline(cin,animal_type);
- if( animal_type==""){
- cout<<"Sorry all information in this field are required!"<<endl;
- continue;
- }
- cout<<endl<<endl;
- cout<<"Name:"<<name<<endl;
- cout<<"Issued from:"<<valid_from<<endl;
- cout<<"Expiry date:"<<valid_till<<endl;
- cout<<"License Number:"<<license_num<<endl;
- cout<<"Remark for the bearer:"<<owner_remark<<endl;
- cout<<"District:"<<district<<endl;
- cout<<"Verify! If correct enter '1' else '0':";
- cin>>e;
- if(e==1){
- animal_license l(district,animal_type,name,valid_from,valid_till,license_num,owner_remark);
- folder + l;
- ofstream file5;
- file5.open("animals.txt");
- folder.save_business_license(file5);
- file5.close();
- }
- else{
- continue;
- }
- break;
- }
- }
- if (q==2){
- cout<<"What Category of Document ?:"<<endl;
- cout<<"General License?::Enter 1"<<endl;
- cout<<"Bussiness License?::Enter 2"<<endl;
- cout<<"Driving license?::Enter 3"<<endl;
- cout<<"Animal License?::Enter 4"<<endl;
- cout<<endl<<"Enter:";
- cin>>e;
- if(e=1){
- company qw;
- qw.search_license(license_num);
- }
- if(e=2){
- company qe;
- qe.search_business_license(license_num);
- }
- if(e=3){
- company qr;
- qr.search_d_license(license_num);
- }
- if(e=4){
- company qt;
- qt.search_animal_license(license_num);
- }
- }//*****
- if (q==3){
- cout<<"What Category of Document ?:"<<endl;
- cout<<"General License?::Enter 1"<<endl;
- cout<<"Bussiness License?::Enter 2"<<endl;
- cout<<"Driving license?::Enter 3"<<endl;
- cout<<"Animal License?::Enter 4"<<endl;
- cout<<endl<<"Enter:";
- cin>>e;
- if(e=1){
- company aw;
- aw.remove_license(license_num);
- }
- if(e=2){
- company ae;
- ae.remove_business_license(license_num);
- }
- if(e=3){
- company ar;
- ar.remove_d_license(license_num);
- }
- if(e=4){
- company at;
- at.remove_animal_license(license_num);
- }
- }
- if (q==4){
- cout<<"What Category of Document ?:"<<endl;
- cout<<"General License?::Enter 1"<<endl;
- cout<<"Bussiness License?::Enter 2"<<endl;
- cout<<"Driving license?::Enter 3"<<endl;
- cout<<"Animal License?::Enter 4"<<endl;
- cout<<endl<<"Enter:";
- cin>>e;
- if(e=1){
- company zw;
- zw.display_license();
- }
- if(e=2){
- company ze;
- ze.display_business_license();
- }
- if(e=3){
- company zr;
- zr.display_d_license();
- }
- if(e=4){
- company zt;
- zt.display_animal_license();
- }
- }
- if(q!=1 || q!=2 || q!=3 || q!=4){
- cout<<"Please Use what u have been given: 1,2,3,4 ONLY!!!"<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement