case class EmployeesCommission(first_name: String,
last_name: String,
salary: Double,
commission_pct: Double) {
override def toString(): String = {
s"first_name: " + first_name + ";" + "last_name: " + last_name +
";" + "commission amount:" + getCommissionAmount()
}
def getCommissionAmount(): Any = {
if(commission_pct == 0.0) {
"Not eligible"
} else salary * commission_pct
}
}