In this exercise you will establish some constants to be used in the operation of a bank.
You have five tasks:
Create the FixedInterestRate untyped numeric constant to hold the value of 5% (5/100), then implement the GetFixedInterestRate function to return it:
GetFixedInterestRate()
// => 0.05Create the DaysPerYear constant with type int to hold the value 365, then implement the GetDaysPerYear function to return it:
GetDaysPerYear()
// => 365In a block, use the Go enumerator to create twelve untyped numeric constants to hold the values 1 through 12 for the months of the year.
Name them Jan, Feb, Mar, etc., then implement the GetMonth function to return the value for a given month:
GetMonth(Jan)
// => 1Create the AccountNo untyped string constant to hold the value XF348IJ, then implement the GetAccountNumber function to return it:
GetAccountNumber()
// => "XF348IJ"In this exercise you will establish some constants to be used in the operation of a bank.
You have five tasks:
Create the FixedInterestRate untyped numeric constant to hold the value of 5% (5/100), then implement the GetFixedInterestRate function to return it:
GetFixedInterestRate()
// => 0.05Create the DaysPerYear constant with type int to hold the value 365, then implement the GetDaysPerYear function to return it:
GetDaysPerYear()
// => 365In a block, use the Go enumerator to create twelve untyped numeric constants to hold the values 1 through 12 for the months of the year.
Name them Jan, Feb, Mar, etc., then implement the GetMonth function to return the value for a given month:
GetMonth(Jan)
// => 1Create the AccountNo untyped string constant to hold the value XF348IJ, then implement the GetAccountNumber function to return it:
GetAccountNumber()
// => "XF348IJ"