//returns if an airline has enough free slots at an airport
//returns the yearly payment for a number of gates
public static double GetYearlyContractPayment(
Airport airport,
AirportContract.ContractType type,
int gates,
int length)
{
double basePrice = 0;
if (type == AirportContract.ContractType.Full)
{
basePrice = airport.GetGatePrice()*12;
}
if (type == AirportContract.ContractType.LowService)
{
basePrice = airport.GetGatePrice()*13;
}
if (type == AirportContract.ContractType.MediumService)
{
basePrice = airport.GetGatePrice()*17;
}
if (type == AirportContract.ContractType.FullService)
{
basePrice = airport.GetGatePrice()*20;
}
double lengthFactor = 100 - length;
return gates*(basePrice*(lengthFactor/100));
}