ApexSensei

Drills Classes & objects

Return a value and record work

A method's return type promises a value back to the caller.

Your task

Finish LeadWorkQueue and run the three debug lines.

class LeadWorkQueue {
    private Integer processedCount = 0;

    public String nextAction(String leadName) {
        return '';
    }

    public void markProcessed() {
    }

    public Integer getProcessedCount() {
        return processedCount;
    }
}

Requirements

  1. Void method should be present
  2. Calls the void method should be present
  3. Second queue should be present
  4. First Lead action should be Action: Review Maya Chen
  5. Two void calls should be recorded as Processed: 2
  6. New queue count should be New queue: 0
  7. nextAction('Omar Diaz') should be Review Omar Diaz

Sign in to open this drill