/*File Name: UnderArea.cpp
  Author: Betti Österholz ; Date: 06.08.2003
  System: C++
  
  This is implementation of the Basisclass of all Vector objects

*/


#include "UnderArea.h"
//---------------------------------------------------------------------------


   //Construktors:
UnderArea::UnderArea():Vector(2)
//standart constructor
//makes a blank object for from a to b UnderAreas, it has 2 components
{}

UnderArea::UnderArea(const UnderArea& area):Vector(area)
//copy constructor
//makes a UnderArea vector object with the same values as the given UnderArea
//vector
//pre: the UnderArea vector to copy
{}

unsigned long UnderArea::getTimeNeed() const
//to get a idea how long the object need to evaluate
//post: a number for how much time the object need to evaluate
{
if (((*Component[0].Value)<(*Component[1].Value)))
	return (unsigned long)((*Component[1].Value)-(*Component[0].Value)+1);
//else
return (unsigned long)((*Component[0].Value)-(*Component[1].Value)+1);
}

UnderArea* UnderArea::copy()
//copy this object(means all, even the objects in it)
//post: a pointer to the copy of this object
{
return (new UnderArea(*this));
}
	
string UnderArea::classnameOf() const
//returns the classname of this object as a string
//post: the classname of this object as a string
{return "UnderArea";}





