-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLA2.cpp
61 lines (51 loc) · 1.62 KB
/
LA2.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
#include<bits/stdc++.h>
using namespace std;
class student
{
char name[20],division,bloodgroup[2],contact_address[50];
int roll_number,class_,dateofbirth,telephone_number,driving_license_no;
public:
student(){cout<<"constuctor is displayed "<<endl;}
void input(){
cout<<"Enter Name :";
cin>>name;
cout<<"Enter division :";
cin>>division;
cout<<"Enter blood group :";
cin>> bloodgroup;
cout<<"Enter contact address:";
cin>>contact_address;
cout<<"Enter roll number :";
cin>>roll_number;
cout<<"Enter class :";
cin>>class_;
cout<<"Enter date of birth :";
cin>>dateofbirth;
cout<<"Enter telephone number :";
cin>>telephone_number;
cout<<"Enter driving_license_no";
cin>>driving_license_no;
}
void display(){
cout<<"\n Name : "<<name;
cout<<"\n division : "<<division;
cout<<"\n blood group : "<<bloodgroup;
cout<<"\n contact address : "<<contact_address;
cout<<"\n roll number : "<<roll_number;
cout<<"\n class : "<<class_;
cout<<"\n dateofbirth : "<<dateofbirth;
cout<<"\n telephone number : "<<telephone_number;
cout<<"\n driving license no : "<<driving_license_no;
}
~student(){cout<<" destucrtor is displayed "<<endl;}
};
int main()
{
student s1,s2,s3;
s1.input();
s2.input();
s3.input();
s1.display();
s2.display();
s3.display();
}