calculateSimpleInterest static method

double calculateSimpleInterest(
  1. double principal,
  2. double rate,
  3. double time
)

Calculate simple interest

principal - Principal amount rate - Interest rate (as decimal) time - Time period Returns simple interest amount

Implementation

static double calculateSimpleInterest(double principal, double rate, double time) {
  return principal * rate * time;
}