-
Notifications
You must be signed in to change notification settings - Fork 0
/
library.cpp
68 lines (68 loc) · 1.22 KB
/
library.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include<iostream>
using namespace std;
class student{
private:
string name,trade;
int roll;
public:
void get(){
cout<<"Enter The Name Of Student:";
cin>>name;
cout<<"Enter The Trade:";
cin>>trade;
cout<<"Enter The Roll No:";
cin>>roll;
}
void put(){
cout<<"Student Name Is:"<<name<<endl;
cout<<"Trade Is:"<<trade<<endl;
cout<<"Roll No. Is:"<<roll<<endl;
}
};
class book{
private:
string bname;
int code;
float price;
public:
void get(){
cout<<"Enter The Name Of Book:";
cin>>bname;
cout<<"Enter The Book Code:";
cin>>code;
cout<<"Enter The Price:";
cin>>price;
}
void put(){
cout<<"Name Is:"<<bname<<endl;
cout<<"Code Is:"<<code<<endl;
cout<<"Price Is:"<<price<<endl;
}
};
class library{
private:
string date;
int num;
book b1;
student s1;
public:
void gettrans(){
cout<<"Enter The Date:";
cin>>date;
cout<<"Enter The Transaction Number:";
cin>>num;
b1.get();
s1.get();
}
void show(){
cout<<"Date Is:"<<date<<endl;
cout<<"Transaction Number Is:"<<num<<endl;
b1.put();
s1.put();
}
};
int main(){
library l1;
l1.gettrans();
l1.show();
return 0;};