Why do we use floating-point numbers in C#? I don't understand their usage. Please see example below.?

public static BankAccount openBankAccount(string owner, double balance)
{
return openBankAccount(owner, balance, 0.0);
}
public static BankAccount openBankAccount(string owner)
{
return openBankAccount(owner, 0.0);
}

2014-04-03T13:21:29Z

What does 0.0 stand for? What does it represent?

2014-04-03T13:32:11Z

Like owner is owner, balance is balance, but 0.0 has nothing in "public static BankAccount openBankAccount" defining it.

Anonymous2014-04-03T13:18:06Z

Your question makes no sense. Are you asking why it's 0.0 and not just 0?

0 is a decimal number
0.0 is a floating point number (double precision I believe). it stands for zero.

oops, didn't see you had the function there. I am confused why there are two unctions called openBankAccount, why they both call openBankAccount. is there a third openBankAccount that takes three arguments?

you don't seem to know how methods / functions work. You are passing in 0.0, that becomes balance in openBankAccount.