//changing kr leena
//Library name wagaira main
#include<iostream.h>
#include<stdlib.h>
#include<conio.h>
#include<iostream.h>
class lib
{
public:
char log[30];
char paswrd;
lib()
{
strcpy(log,"");
}
void go()
{
cout<<"\tPlease Enter your username and password";
cout<<"\tLogin : ";
cin>>log;
cout<<"\tPassword: ";
cin>>paswrd;
cout<<endl;
};
class Library:public lib
{
public:
void Obooks();
void mag();
void thesis();
void Nbooks();
private:
char date[10];
char month[10];
char year[10];
char rollno[20];
char dept[10];
char topicname[10];
char Name[10];
char writer[10];
};
void Library::mag()
{
cout<<"Your name:\n";
cin>>Name;
cout<<"Vu ID :\n";
cin>>rollno;
cout<<"Enter the Department name :\n";
cin>>dept;
cout<<"Topic author's name :\n";
cin>>writer;
cout<<"\n Enter the name of the topic that you want to read :\n";
cin>>topicname;
cout<<"Enter the Date of issuence of magzine :\n";
cin>>date;
cout<<"Enter the Month of issuence of magzine :\n";
cin>>month;
cout<<"Enter the Year of issuence Year of magzine : \n";
;
cin>>year;
cout<<"\n\t Now we can issue a magzine :\n";
}
void Library::Obooks()
{
cout<<"Your name :\n";
cin>>Name;
cout<<"Vu ID :\n";
cin>>rollno;
cout<<"Enter the Department name :\n";
cin>>dept;
cout<<"Book Name :\n";
cin>>Name;
cout<<"Book Author's name :\n";
cin>>writer;
cout<<"Enter the Date of issuence of Book :\n";
cin>>date;
cout<<"Enter the Month of issuence of Book :\n";
cin>>month;
cout<<"Enter the Year of issuence Year of Book : \n";
cin>>year;
cout<<"\n\t Now we can issue a book which you want :\n";
}
void Library::Nbooks()
{
cout<<"Your Name : \n";
cin>>Name;
cout<<"Vu ID : \n";
cin>>rollno;
cout<<"Enter the Date of issuence of Newspaper :\n";
cin>>date;
cout<<"Enter the Month of issuence of Newspaper :\n";
cin>>month;
cout<<"Enter the Year of issuence Year of Newspaper : \n";
cin>>year;
cout<<"\n\t Now we can issue a Newspaper to you : \n";
}
void Library::thesis()
{
cout<<"Your name : \n";
cin>>Name;
cout<<"Vu ID : \n";
cin>>rollno;
cout<<"Enter the Department name : \n";
cin>>dept;
cout<<"Thesis author's name : \n";
cin>>writer;
cout<<"Enter the Date of issuence of Thesis :\n";
cin>>date;
cout<<"Enter the Month of issuence of Thesis :\n";
cin>>month;
cout<<"Enter the Year of issuence Year of Thesis : \n";
cin>>year;
cout<<"\n\t Now we can issue thesis to you : \n";
}
int main()
{
lib A;
A.go();
Library L;
int a,z;
int getbook;
char press,pass,b,N[20],Name[20],dept[10],rollno[15];
char choice;
do
{
cout<<endl;
cout<<endl;
cout<<"\t\t Welcome in Library Management System (L.M.S.) \n";
cout<<endl;
system("pause");
cout<<endl;
cout<<"\t L.M.S. wants some Information about you \n ";
cout<<"\t If you are a Teacher : >>> (press T) \n ";
cout<<"\t If you are a Student : >>> (press S) \n ";
cout<<"\nEnter your choice : ";
cin>>b;
{
if((b=='s' || b=='S') || (b=='l' || b=='L') || (b=='t' || b=='T'))
{{
cout<<"\nWe are wanting to strore some data for record\n\n";
{
if((b=='t' || b=='T') || (b=='s' || b=='S'))
{
if(b=='t' || b=='T')
{
cout<<"\nRequired Data from the Teacher\n";
cout<<"Teacher (Your) name :\n";
cin>>Name;
cout<<"Department ID : \n";
cin>>rollno;
cout<<"Enter the Department name, In which you are teaching :\n";
cin>>dept;
}
if(b=='s' || b=='S')
{
cout<<"\nReqired Data from the Student\n";
cout<<"Student (Your) name :\n";
cin>>Name;
cout<<"Vu ID : \n";
cin>>rollno;
cout<<"Enter the Department name, In which you are studying :\n";
cin>>dept;
}
cout<<"Stay here, I call to the librarian :\n";
cout<<"\n\tpress L to call the librarian :";
cin>>b;
{
if(b=='l' || b=='L')
{
cout<<"\tWelcome Dear : |\n";
cout<<"\tWhat you want : |\n";
if(b=='l' || b=='L')
{
cout<<"\nRequired Data from the Librarian\n";
cout<<"Your name :\n";
cin>>Name;
cout<<"Department ID : \n";
cin>>rollno;
cout<<"Side door ID : \n";
cin>>rollno;
cout<<"Library Side door password ('p') :\n";
cin>>pass;
{
if (pass=='p' || pass=='P')
{
cout<<"\nHow much books you wanted to give (number of books) ? :\n";
cin>>getbook;
{
if(getbook<2)
{
cout<<"\t Please return this book and get more books : \n";
cout<<"\t Just one book can be issued at a time : \n";
cout<<"\t When you will return this book then you will get more books : \n";
cout<<"\t Just one book can be issued at a time : \n";
cout<<"\t You can get your wish : ";
cout<<"\n\t| | If you want to read Magazines >>> | (press 1) | |\n ";
cout<<"\t| | If you want to read Books >>> | (press 2) | |\n ";
cout<<"\t| | If you want to read Newspaper >>> | (press 3) | |\n ";
cout<<"\t| | If you want to read Thesis >>> | (press 4) | |\n";
cout<<"\nEnter your choice : ";
cin>>a;
switch(a)
{
case 1:
L.mag();
break;
case 2:
L.Obooks();
break;
case 3:
L.Nbooks();
break;
case 4:
L.thesis();
break;
default:
cout<<"\t\t\n\nInvalid Entry\n\n";
}
}
else
{
cout<<"\nInvalid Entry :\n";
}
}
}
else
{
cout<<"\nI think you can't your account :\n";
}
}
}
else
{
cout<<"You are trying to waste our time, Now you can go :";
}
}
}
}
else
{
cout<<"You are trying to waste our time, Now you can go :";
}
}
}
else
{
cout<<"\t| We can issue just 1 book : | \n";
cout<<"\t| You cannot get your wish |";
}
cout<<"\n\n\n For next try press 'Y' if not then Press 'N': \n";
cout<<"----\n";
cin>>choice;
cout<<"----\n";
}
while(choice='y');
return 0;
getch();
system("pause");
}
You received this message because you are subscribed to the Google Groups "Virtual University of Pakistan" group.
To post to this group, send email to discussion_vu@googlegroups.com.
To unsubscribe from this group, send email to discussion_vu+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/discussion_vu?hl=en.
No comments:
Post a Comment