for synco answers

profileLeila@
cs12_allfiles.zip

Book applications/Chapter 01/FinancialCalculations/app.config

Book applications/Chapter 01/FinancialCalculations/bin/Debug/FinancialCalculations.exe

Book applications/Chapter 01/FinancialCalculations/bin/Debug/FinancialCalculations.exe.config

Book applications/Chapter 01/FinancialCalculations/bin/Debug/FinancialCalculations.pdb

Book applications/Chapter 01/FinancialCalculations/bin/Debug/FinancialCalculations.vshost.exe

Book applications/Chapter 01/FinancialCalculations/bin/Debug/FinancialCalculations.vshost.exe.config

Book applications/Chapter 01/FinancialCalculations/bin/Debug/FinancialCalculations.vshost.exe.manifest

Book applications/Chapter 01/FinancialCalculations/Calculations.cs

using System; using System.Threading.Tasks; namespace FinancialCalculations { public class Calculations { public static decimal CalculateFutureValue(decimal monthlyInvestment, decimal monthlyInterestRate, int months) { double dMonthlyInvestment = Convert.ToDouble(monthlyInvestment); double dMonthlyInterestRate = Convert.ToDouble(monthlyInterestRate); double dMonths = Convert.ToDouble(months); double dFutureValue = dMonthlyInvestment * (Math.Pow(1 + dMonthlyInterestRate, dMonths) - 1) / dMonthlyInterestRate; decimal futureValue = Convert.ToDecimal(dFutureValue); return futureValue; } public static decimal CalculateMonthlyInvestment(decimal futureValue, decimal monthlyInterestRate, int months) { double dFutureValue = Convert.ToDouble(futureValue); double dMonthlyInterestRate = Convert.ToDouble(monthlyInterestRate); double dMonths = Convert.ToDouble(months); double dMonthlyInvestment = dMonthlyInterestRate * dFutureValue / (Math.Pow(1 + dMonthlyInterestRate, dMonths) - 1); decimal monthlyInvestment = Convert.ToDecimal(dMonthlyInvestment); return monthlyInvestment; } public static double CalculateSYDDepreciation(double cost, double salvage, double life, double period) { double SYDValue = (cost-salvage) * (life-period+1) * 2 / ((life)*(life+1)); return SYDValue; } } }

Book applications/Chapter 01/FinancialCalculations/FinancialCalculations.csproj

Debug AnyCPU 9.0.20706 2.0 {03C1A322-9600-41F2-825D-9A46B1F803F2} WinExe Properties FinancialCalculations FinancialCalculations 3.5 v4.5 true full false bin\Debug\ DEBUG;TRACE prompt 4 false pdbonly true bin\Release\ TRACE prompt 4 false 3.5 3.5 3.5 Form frmDepreciation.cs Form frmInvestment.cs Form frmMain.cs frmDepreciation.cs frmInvestment.cs frmMain.cs Designer ResXFileCodeGenerator Resources.Designer.cs Designer True Resources.resx True SettingsSingleFileGenerator Settings.Designer.cs True Settings.settings True

Book applications/Chapter 01/FinancialCalculations/FinancialCalculations.csproj.user

8.0.50215 ProjectFiles

Book applications/Chapter 01/FinancialCalculations/FinancialCalculations.sln

Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FinancialCalculations", "FinancialCalculations.csproj", "{03C1A322-9600-41F2-825D-9A46B1F803F2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {03C1A322-9600-41F2-825D-9A46B1F803F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {03C1A322-9600-41F2-825D-9A46B1F803F2}.Debug|Any CPU.Build.0 = Debug|Any CPU {03C1A322-9600-41F2-825D-9A46B1F803F2}.Release|Any CPU.ActiveCfg = Release|Any CPU {03C1A322-9600-41F2-825D-9A46B1F803F2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Book applications/Chapter 01/FinancialCalculations/FinancialCalculations.suo