Oracle
1Z0-860 · Question #5
A developer writes two session beans which cooperate. The first session bean, ShoppingCart, collects orders and is implemented as a stateful session bean. The second session bean, CalculateDiscount…
The correct answer is C. The CalculateDiscount offers a method calculate which is invoked by the ShoppingCart bean passing its. See the full explanation below for the reasoning.
Question
A developer writes two session beans which cooperate. The first session bean, ShoppingCart, collects orders and is implemented as a stateful session bean. The second session bean, CalculateDiscount, is implemented as a stateless session bean and runs on a different server. ShoppingCart contains the method getTotalPrice, which calculates the total price of the order in the ShoppingCart, including discounts. Discounts are calculated by CalculateDiscount using the information on the ShoppingCart bean, combined with data from a database. Which scenario can accomplish this?
Options
- AThe CalculateDiscount offers a method calculate which is invoked by the ShoppingCart bean passing
- BThe CalculateDiscount offers a method calculate which is invoked by the ShoppingCart bean.
- CThe CalculateDiscount offers a method calculate which is invoked by the ShoppingCart bean passing its
- DThe CalculateDiscount offers a method calculate which is invoked by the ShoppingCart bean.
How the community answered
(44 responses)- A16% (7)
- B9% (4)
- C73% (32)
- D2% (1)
Community Discussion
No community discussion yet for this question.