Answer :

Answer:

#include<iostream>

using namespace std;

class Instructor

{

   public :

   string pname,course_name;

   Instructor(string name,string course)  //constructor to initialise member variables

   {

       pname=name;

       course_name=course;

   }

   string get_pname() //method to return professor's name

   {

       return pname;

   }

   string get_cname() //method to return course name

   {

       return course_name;

   }

};

int main()

{

   Instructor i("Rajpal","MCA"); //constructor is called

   cout<<"Professor's name is "<<i.get_pname();

   cout<<"\nProfessor teaches "<<i.get_cname();

   return 0;

}

OUTPUT :

Professor's name is Rajpal

Professor teaches MCA

Explanation:

As nothing is mentioned in question. A c++ code implementation of statements is created.Instructor class has a constructor which takes 2 values. Statements mentioned in question can easily be run by the above program.