/*
 * boatWithSupport.cpp
 *
 *  Created on: 16 de Abr de 2013
 *      Author: Windows
 */

#include "BoatWithSupport.h"

BoatWithSupport::BoatWithSupport(int extraCapacity) :
		Boat() {
	extraCap = extraCapacity;
	lastMaxCap = 0;
	lastTransported = 0;
}

BoatWithSupport::BoatWithSupport(int capacity, int extraCapacity) :
		Boat(capacity) {
	extraCap = extraCapacity;
	lastMaxCap = 0;
	lastTransported = 0;
}

int BoatWithSupport::getExtraCapacity() {
	return extraCap;
}

int BoatWithSupport::getMaxCapacity() {
	return this->maxCapacity + this->extraCap;
}


BoatWithSupport::~BoatWithSupport() {
	// TODO Auto-generated destructor stub
}

void BoatWithSupport::reset() {
	this->transportedQuantity = lastTransported;
	this->maxCapacity = lastMaxCap;
}

void BoatWithSupport::resize() {
	this->lastMaxCap = this->maxCapacity;
	this->maxCapacity = this->extraCap;
	lastTransported = this->transportedQuantity;
	this->transportedQuantity = this->extraCap;
}
