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

using namespace std;

WorkingStudent::WorkingStudent(const char* name, int sal)
   : Student(name), salary(sal)
{
   cout << "A Working Student has been created with salary: "
        << salary << endl;
}

void WorkingStudent::set_months(int mons)
{
   months = mons;
}

int WorkingStudent::get_income() const
{
   return months * salary;
}

void WorkingStudent::print() const
{
   Student::print();
   cout << "The Income is: " << get_income() << endl;
}

WorkingStudent::~WorkingStudent()
{
   cout << "A Working Student is to be destroyed! " << endl;
}
