using System; using System.ServiceModel; public class EMIService : IEMICalculator { public double GetInterestComponent(double principalAmount, double interestRate) { double interestComponent = 0; interestComponent = ((principalAmount * interestRate) / 100 ) / 12; return interestComponent; } public double GetPrincipalComponent (double principalAmount, double interestRate, double EMIAmount) { double interestComponent = 0; interestComponent = ((principalAmount * interestRate) / 100 ) / 12; double principalComponent = EMIAmount - interestComponent; return principalComponent; } }