Overload a Case label method
Overloading is one method name with different parameter lists; Apex picks the version whose parameters match your call.
Your task
Overload a Case label method so each parameter list handles normal, urgent or aged Cases.
class CaseLabeler {
public String label(String subject) {
return null;
}
}Requirements
label(String, Boolean)should be presentlabel(String, Integer)should be presentDefault: Normal: Password resetshould be printedWith flag: Urgent: Data lossshould be printedWith age: Aged: Pending refundshould be printedlabel('Pending refund', 6)should beNormal: Pending refundlabel('Printer jam', false)should beNormal: Printer jam