An if statement runs its body only when its condition is true. An else gives the alternative. A return inside either branch ends the method call, so a guard clause can handle an exceptional input before the normal work starts. That makes a zero denominator easier to reason about.
Overlapping rules need an order. If minutes at or below zero are on time and minutes up to fifteen are minor delays, check the on-time range first. Otherwise the broader test consumes it. For separate named codes, a switch expression can return the matching value directly. Arrow cases don't fall through, and default handles unmatched codes. These exercises include equality boundaries because changing < to <= can change a category even when ordinary examples still pass.