Example: Amount Received at Maturity for a Fully Invested Security

The amount to be received at maturity for a 10 year bond is returned in this example.
using System;
using Imsl.Finance;

public class receivedEx1
{
    public static void  Main(String[] args)
    {
        DateTime settlement = DateTime.Parse("7/1/85");
        DateTime maturity = DateTime.Parse("7/1/95");
        double investment = 7000.0;
        double discount = .06;
        DayCountBasis dcb = DayCountBasis.BasisActual365;
        double received = Bond.Received(settlement, maturity, 
                                        investment, discount, dcb);
        Console.Out.WriteLine("The amount received at maturity for the"
                              + " bond is " + received.ToString("C"));
    }
}

Output

The amount received at maturity for the bond is $17,514.40

Link to C# source.