Oracle
1Z0-554 · Question #65
You want to display a calculation of the total compensation for an employee. The total compensation is the salary plus the salary multiplied by any commission percentage. The salary and commission…
The correct answer is A. (Salary!=null ? Salary: 0) + (Salary* (CommissionPct ! =null : CommissionPct ? 0)). creating calculated attributes; second point)
Integration Flow Development
Question
You want to display a calculation of the total compensation for an employee. The total compensation is the salary plus the salary multiplied by any commission percentage. The salary and commission percentage are stored in the database, but the total compensation is not. A transient attribute has been defined in the employee entity object to display the total compensation. What would be the transient attribute's value if it was written in Groovy?
Options
- A(Salary!=null ? Salary: 0) + (Salary* (CommissionPct ! =null : CommissionPct ? 0))
- B(Salary! =null ? Salary : 0) +- (Salary* (CommissionPct:) )
- C(Salary! =null : Salary*? 0) + (Salary* (CommissionPct !=null ? CommissionPct : 0) )
- D(Saiary!=null ? Salary: 0) +(Salary* (CommissionPct ==null ? CommissionPct : 0) )
- E(Salary !=null 7 Salary: 0) + (Salary* (CommissionPct !=null ? CommissionPct ; 0))
How the community answered
(17 responses)- A82% (14)
- B12% (2)
- C6% (1)
Explanation
creating calculated attributes; second point)
Topics
#Groovy expressions#transient attributes#entity objects#null handling
Community Discussion
No community discussion yet for this question.