// Constructors public MortgageAccount(AccountType type, AccountCurrency currency, AccountPeriod period, RealEstate ownerProperty, decimal loanAmount, Customer owner, long accountNumber) : base(type, currency, period, owner, accountNumber) { this.ownerProperty = ownerProperty; if (loanAmount > 0) { if (this.ownerProperty.Price >= loanAmount) { this.loanAmount = loanAmount; } else { throw new ArgumentException(String.Format("Loan amount cannot exceed: {0}", this.ownerProperty.Price)); } } else { throw new ArgumentException("Amount of the loan must be bigger than 0"); } }