Add a static member to store Service Tax, which is set to 12.3%. Also allow a property through which we can set and get service tax.
Modify TotalFee and DueAmount properties to consider service tax.
public class Tax
{
public double ServiceTax { get; set; }
public double DueAmount { get; set; }
public double TotalFee
{
get
{
return DueAmount + DueAmount * ServiceTax;
}
}
public Tax()
{
ServiceTax = 0.123;
}
}
Comments
Leave a comment