#include<iostream>
#include"wstudent.h"

using namespace std;

/*
void bla(Student s)  // what if arg was a ptr or ref?
{
    cout << "The name of the bla student is " << s->get_name() << endl;
}
*/

int main()
{
   WorkingStudent ws("TheWSName", 1000);

cout << "*****************************************" << endl;

   Student s("FirstLast");

cout << "*****************************************" << endl;
/*
   Student scpws(ws);
*/

cout << "*****************************************" << endl;

   WorkingStudent* pws;
   Student* ps;

///////////////////////////////////////////////////////////////
/*
   pws = &ws;
   ps = &s;

   ps = &ws;  // ok
//   pws = &s;  // error
*/
///////////////////////////////////////////////////////////////
//   s = ws;    // Student operator = is called (Student::=)
//   ws = s;    // error

///////////////////////////////////////////////////////////////
//   ps = pws;  // ok
//   pws = ps;  // error

///////////////////////////////////////////////////////////////
/*
cout << "*****************************************" << endl;
   s.set_no(10);
   s.print();
//   ps = &s;
//   ps->print();

cout << "*****************************************" << endl;
   ws.set_no(100);
   ws.set_months(12);
   ws.print();
   pws = &ws; 
//   pws->print();

*/
///*
//%%%%%% BUT, ... %%%%%%%%%%%%%%%%%
cout << "*****************************************" << endl;
//   ps = &ws;
// OR
//   ps = pws;
    
//   ps->print();
   
//*/

///////////////////////////////////////////////////////////////
///*
//   bla(s);
//   bla(ws);
//*/

cout << "*****************************************" << endl;
   return 0;
}
