static void Main(string[] args) { FixedDeposit account = new FixedDeposit("Abc", 10000, 2, FestivalType.HOLI); Console.WriteLine("\nName:" + account.Name + "\nPrincipal:" + account.Principal + "\nYear:" + account.Year + "\nInterset:" + account.CalculateSimpleInterest()); }
static void Main(string[] args) { FixedDeposit fixeddeposit = new FixedDeposit("priyank", 100000, 10, FixedDeposit.Festivaltype.Normal); PrintSimpleinterest printsimpleinterest = new PrintSimpleinterest(); printsimpleinterest.Printinfo(fixeddeposit); }
private static void PrintInfo(FixedDeposit fixedDeposit) { Console.WriteLine("======= Fixed Deposit Info ========"); Console.WriteLine("Account Number : " + fixedDeposit.AccountNumber); Console.WriteLine("Account Name : " + fixedDeposit.AccountName); Console.WriteLine("Amount : " + fixedDeposit.Amount); Console.WriteLine("Years : " + fixedDeposit.Years); Console.WriteLine("Festival Type : " + fixedDeposit.Festival); Console.WriteLine("Total Amount : " + Math.Round(fixedDeposit.CalculateSimpleInterest(), 2)); }
public void Printinfo(FixedDeposit f) { Console.WriteLine("Name:{0}", f.Name); Console.WriteLine("Principal Amount:{0}", f.PrincipalAmount); Console.WriteLine("Simple Interest:{0}", f.CalculateSimpleInterest()); }
static void Main(string[] args) { FixedDeposit fixedDeposit = new FixedDeposit(1001, "Sumit Gupta", 50000, 50000, 5, FestivalType.DIWALI); PrintInfo(fixedDeposit); }
static void Main(string[] args) { FixedDeposit fd = new FixedDeposit("meet", 100000, 10, FestivalType.NORMAL); Console.WriteLine("Simple Interest :{0}", fd.CalculateSimpleInterest()); }