Exemple #1
0
 public Account(string costumer, CostumerType tipClient, double balance, double interestRate, double nrOfMonths)
 {
     this.Costumer     = costumer;
     this.TipClient    = tipClient;
     this.Balance      = balance;
     this.InterestRate = interestRate;
     this.NrOfMonths   = nrOfMonths;
 }
        private decimal CalculateTotalPrice(CostumerType costumerType, IEnumerable <DateTime> dates)
        {
            decimal totalPrice = 0;

            foreach (var date in dates)
            {
                totalPrice += GetPrice(costumerType, date);
            }

            return(totalPrice);
        }
        private HotelSearchCriteria CreateHotelSearchCriteria(CostumerType costumerType, DateTime startDate, DateTime finishDate)
        {
            List <DateTime> dates = new List <DateTime>();

            for (DateTime date = startDate; date <= finishDate; date = date.AddDays(1))
            {
                dates.Add(date);
            }

            return(new HotelSearchCriteria(costumerType, dates.ToArray()));
        }
Exemple #4
0
 public HotelSearchCriteria(CostumerType costumerType, params DateTime[] dates)
 {
     CostumerType = costumerType;
     Dates        = dates;
 }
 public IoanAccount(CostumerType costumerTytpe, double balance, double interestRate)
     : base(costumerTytpe, balance,interestRate)
 {
 }
Exemple #6
0
 public LoanAccount(string costumer, CostumerType tipClient, double balance, double interestRate, double nrOfMonths) : base(costumer, tipClient, balance, interestRate, nrOfMonths)
 {
 }
Exemple #7
0
 public Mortgage(CostumerType costumerTytpe, double balance, double interestRate)
     : base(costumerTytpe, balance,interestRate)
 {
 }
Exemple #8
0
 public account(CostumerType costumerTytpe, double balance, double interestRate)
 {
     this.CostumerType = costumerTytpe;
     this.Balance = balance;
     this.InterestRate = interestRate;
 }
        private decimal GetPrice(CostumerType costumerType, DateTime date)
        {
            Price price = PriceByCostumerType[costumerType];

            return(price.GetByDate(date));
        }
Exemple #10
0
 private HotelSearchCriteria(CostumerType costumerType, IEnumerable <DateTime> dates)
 {
     CostumerType = costumerType;
     Dates        = dates;
 }