/*------------------------------------------------------------------------------
Description: Shift Class for Detail Scheduler
Author: Chris Huyler, Tim Cross
Language: C++
Name: Shift.h
Date: March 21, 2000
------------------------------------------------------------------------------*/
#include "DayConverter.h"

class Shift {
   public:
      void Set_Init_Shift();
   	void Set_Day();				// set the day of the shift
      void Set_StartTime();  // set start time of shift
      void Set_EndTime();    // set end time of shift
      int& Get_Day();								// return the day
      float& Get_StartTime();					// return the start time
      float& Get_EndTime();						// return the end time
      virtual string Identify();				// return type;
      virtual void Print();
// virtual functions that allow me to use the real functions when the pointer
// is the base class.  Builder will not let me do *DerivedClass = *BaseClass,
// or let me call the functions from *BaseClass unless they are defined as such -
      virtual char* Get_Description();
      virtual int&  Get_CarNum();
      virtual char* Get_Location();
      virtual char* Get_Employer();
	protected:
      DayConverter d;
   	int Day;
      float StartTime;
      float EndTime;

};

void Shift::Set_Init_Shift(){
	Set_Day();
   Set_StartTime();
   Set_EndTime();
}
void Shift::Set_Day(){
	Day = d.create_day();
}
void Shift::Set_StartTime(){
	textcolor(WHITE);
   cprintf("\nEnter Start Time: ");
   textcolor(LIGHTGRAY);
   cin >> StartTime;
}
void Shift::Set_EndTime(){
   textcolor(WHITE);
	cprintf("\nEnter End Time: ");
   textcolor(LIGHTGRAY);
   cin >> EndTime;
}
int& Shift::Get_Day(){
	return(Day);
}
float& Shift::Get_StartTime(){
	return(StartTime);
}
float& Shift::Get_EndTime(){
	return(EndTime);
}
string Shift::Identify(){
	return("Shift");
}
void Shift::Print(){
	cout << endl << Day << " " << StartTime << " " << EndTime << endl;
}


char* Shift::Get_Description(){
	return("This is a shift");
}
int& Shift::Get_CarNum(){
	return(Day);
}
char* Shift::Get_Location(){
	return("Location does not exist");
}
char* Shift::Get_Employer(){
	return("Employer does not exist");
}

