Class student contains roll number, name and course as data members and Input_student and display_student as member functions. Create a class exam and publicly inherit it from student class. The derived class contains an array of marks and no_of_subjects as data members, and input_marks and display_result as member functions. Overload “<=", ")" and “+=" operators and use the overloaded operators in the main function. Create an array of objects of the exam class and display the result of 5 students.

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 solve asap and remove plagiarism make it different from others which already available on internet.like bartleby and chegg.i also upload half code from chegg .here in this code # define is used which I didn't read.so please use something else.

Class student contains roll number, name and course as data members and Input_student
and display_student as member functions. Create a class exam and publicly inherit it from
student class. The derived class contains an array of marks and no_of_subjects as data
members, and input_marks and display_result as member functions. Overload "<=", “()" and
"+=" operators and use the overloaded operators in the main function. Create an array of
objects of the exam class and display the result of 5 students.
Transcribed Image Text:Class student contains roll number, name and course as data members and Input_student and display_student as member functions. Create a class exam and publicly inherit it from student class. The derived class contains an array of marks and no_of_subjects as data members, and input_marks and display_result as member functions. Overload "<=", “()" and "+=" operators and use the overloaded operators in the main function. Create an array of objects of the exam class and display the result of 5 students.
E Answer 1 of 1
Here is the solution to above problem in C++. Please
for more information
Please give a thumbs up!!!
C++ Code
#include<iostream>
#include<string>
#define MAX 100
using namespace std;
//student class
class Student
{
public:
int roll_num; //to store rollnumber
string name; 7/to store name
string course; //to store course
//input the student infor
void input()
{
cout<<"Enter roll number: ";
cin>>this->roll_num;
cout<<"Enter name without spaces
cin>>this->name;
cout<<"Enter course name without
cin>>this->course;
}
//output the student info on the screen
void output()
{
cout<<"Roll number: "<<this->rol.
cout<<"Name: "<<this->name<<endl
cout<<"Course: "<<this->course<<i
}
};
//class ex_am which publicly inherits the studen
class ex_am: public Student
{
public:
/larrav of marks
Transcribed Image Text:E Answer 1 of 1 Here is the solution to above problem in C++. Please for more information Please give a thumbs up!!! C++ Code #include<iostream> #include<string> #define MAX 100 using namespace std; //student class class Student { public: int roll_num; //to store rollnumber string name; 7/to store name string course; //to store course //input the student infor void input() { cout<<"Enter roll number: "; cin>>this->roll_num; cout<<"Enter name without spaces cin>>this->name; cout<<"Enter course name without cin>>this->course; } //output the student info on the screen void output() { cout<<"Roll number: "<<this->rol. cout<<"Name: "<<this->name<<endl cout<<"Course: "<<this->course<<i } }; //class ex_am which publicly inherits the studen class ex_am: public Student { public: /larrav of marks
Expert Solution
steps

Step by step

Solved in 3 steps

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