/// <summary> /// adds a dependent to the database /// </summary> /// <param name="aDependent">the dependent to add</param> public int AddDependent(Dependent aDependent) { // TODO: implement this when DB is in place return -1; }
/// <summary> /// Method to calculate the yearly benefit cost of a dependent /// </summary> /// <param name="aDependent">a dependent</param> /// <returns>cost of dependent</returns> public decimal CalculateDependentCost(Dependent aDependent) { return aDependent.Name.StartsWith(AvailableDiscount, StringComparison.CurrentCultureIgnoreCase) ? DependentCost - (DependentCost * Discount) : DependentCost; }
/// <summary> /// adds a dependent to the list /// </summary> /// <param name="aDependent">the dependent to add</param> public int AddDependent(Dependent aDependent) { aDependent.DependentId = MockData.dependents.Count + 1; MockData.dependents.Add(aDependent); return aDependent.DependentId; }
/// <summary> /// adds a dependent to the list /// </summary> /// <param name="aDependent">the dependent to add</param> public int AddDependent(Dependent aDependent) { aDependent.DependentId = dependents.Count + 1; dependents.Add(aDependent); return aDependent.DependentId; }