Please Fix this probem.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please Fix this probem.

 

[*] Untitled1.cpp
1
#include<iostream.h>
2
#include<conio.h>
3
class student
49 {
protected :
char name[20], dob [10];
int roll;
float dis;
public:
void get data ( )
11E {
6
7
8
9
10
cout<< "Enter name and roll. no of student:";
cin>>name>>roll;
cout<< "Enter data of birth in format yy- mm-dd";
cin>>dob;
16 F }
void discount( )
18 E {
12
13
14
15
17
19
cout<« "Enter discount given to student:";
cin>>disc;
21 F }
virtual void dispresult ( )
23 E {
vout<< "Roll_No"<<"t"name<<"\t"<<dob<<"\t"<<disc<<endl;
}
};
class UG: public student
28 E {
float marks;
20
22
24
25
26
27
29
30
public:
void getmark ()
32 E {
cout<< "Enter marks:";
cin>>marks;
31
33
34
Transcribed Image Text:[*] Untitled1.cpp 1 #include<iostream.h> 2 #include<conio.h> 3 class student 49 { protected : char name[20], dob [10]; int roll; float dis; public: void get data ( ) 11E { 6 7 8 9 10 cout<< "Enter name and roll. no of student:"; cin>>name>>roll; cout<< "Enter data of birth in format yy- mm-dd"; cin>>dob; 16 F } void discount( ) 18 E { 12 13 14 15 17 19 cout<« "Enter discount given to student:"; cin>>disc; 21 F } virtual void dispresult ( ) 23 E { vout<< "Roll_No"<<"t"name<<"\t"<<dob<<"\t"<<disc<<endl; } }; class UG: public student 28 E { float marks; 20 22 24 25 26 27 29 30 public: void getmark () 32 E { cout<< "Enter marks:"; cin>>marks; 31 33 34
void dispresult ()
36 E {
student : : dispresult ();
sout<< "marks="<<Marks;
}
}}
35
37
38
39
40
class PG: public student
42 E {
float marks;
public:
void getmark ()
46 E {
41
43
44
45
cout<< "enter marks:";
cin>>marks;
49 F }
void dispresult ()
51 E {
student : : dispresult ();
cout<« "marks="<<mark.s;
}
}}
void main ()
57日{
student *s1, *s2;
PG P;
UG U;
cout<< "enter PG.student. details:";
47
48
50
52
53
54
55
56
58
59
60
61
62
s1=&P;
s1 getdata ();
P. getmarks ();
cout<< "enter UG student details:";
63
64
65
s2=&U;
s2 getdata ();
cout<« "\nDetails of P.G.student:";
69 s1.dispresult ();
cout<< "\nDetails of U.G.student:";
s2. dispresult ();
getch ();
}
66
67
68
70
71
72
73
Transcribed Image Text:void dispresult () 36 E { student : : dispresult (); sout<< "marks="<<Marks; } }} 35 37 38 39 40 class PG: public student 42 E { float marks; public: void getmark () 46 E { 41 43 44 45 cout<< "enter marks:"; cin>>marks; 49 F } void dispresult () 51 E { student : : dispresult (); cout<« "marks="<<mark.s; } }} void main () 57日{ student *s1, *s2; PG P; UG U; cout<< "enter PG.student. details:"; 47 48 50 52 53 54 55 56 58 59 60 61 62 s1=&P; s1 getdata (); P. getmarks (); cout<< "enter UG student details:"; 63 64 65 s2=&U; s2 getdata (); cout<« "\nDetails of P.G.student:"; 69 s1.dispresult (); cout<< "\nDetails of U.G.student:"; s2. dispresult (); getch (); } 66 67 68 70 71 72 73
Expert Solution
steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY