#import "CTRentalProperty.h"

@implementation CTRentalProperty

@synthesize rentalPrice, address, propertyType; 

- (void)increaseRentalByPercent:(float)percent 
   withMaximum:(float)max
{
   rentalPrice = rentalPrice * (100 + percent) / 100;
   rentalPrice = fmin(rentalPrice, max);
}

- (void)decreaseRentalByPercent:(float)percent 
   withMinimum:(float)min
{
   rentalPrice = rentalPrice * (100 - percent) / 100;
   rentalPrice = fmax(rentalPrice, min);
}

@end
