Question: #include using namespace std; class Seminar { int time; public: Seminar() //Function 1 { time = 30; cout < < Seminar starts now on

#include

using namespace std;

class Seminar

{

int time;

public:

Seminar() //Function 1

{

time = 30;

cout << "Seminar starts now on "

}

void lecture() //Function 2

{

cout << "Lectures in the seminar" << endl;

}

Seminar(int duration) //Function 3

{

time = duration;

cout << "Seminar starts now on " << time <<" minutes"<< endl;

}

~Seminar() //Function 4

{

cout << "Thanks "

}

};

i. Write statements in C++ that would execute Function 1 and Function 3 of class Seminar. (1 marks)

ii. Write the output that will be displayed in std output terminal.(2 marks)

iii. In Object-Oriented Programming, what is Function 4 referred as and when does it get invoked/called? (1 marks)

iv. In Object-Oriented Programming, which concept is illustrated by Function 1 and Function 3 together?(1 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!