ApexSensei

Drills Apex basics

If a Lead is hot

if / else if / else picks one answer from several, in order.

Your task

Fill in scoreBand so it returns Hot, Warm, Cold or Unscored by the rules below.

String scoreBand(Integer score) {
    return null;
}

Requirements

  1. scoreBand(80) should be Hot
  2. scoreBand(79) should be Warm
  3. scoreBand(50) should be Warm
  4. scoreBand(49) should be Cold
  5. scoreBand(null) should be Unscored
  6. scoreBand(100) should be Hot
  7. scoreBand(0) should be Cold

Sign in to open this drill