Stage 2 summary at 50 accepted trajectories
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
43
tasks_gen/train/G1107/spec.md
Normal file
43
tasks_gen/train/G1107/spec.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# 1. Goal
|
||||
A ski resort rents lockers in its ski depot. The depot terminal calls one
|
||||
function module for each locker rental. The function module calculates the fee
|
||||
of the rental. The terminal calls all locker modules in the same way, so the new
|
||||
function module must have the same interface as the sample module.
|
||||
|
||||
# 2. Open questions
|
||||
None.
|
||||
|
||||
# 3. Context
|
||||
- Function group {{P}}FG_LKR exists in package $TMP.
|
||||
- Function module {{P}}LKR_SAMPLE exists in this group. It is the sample locker
|
||||
module. Its interface is the interface that all locker modules must use.
|
||||
- The size code of a locker is stored in the electronic lock of the locker. The
|
||||
terminal sends the code that the lock reports.
|
||||
- The depot has lockers of the three types S, M and L. Locks of retired locker
|
||||
types are still in use in the old part of the depot. These locks report the
|
||||
codes of their retired types.
|
||||
|
||||
# 4. Contract
|
||||
- Create the function module {{P}}LKR_FEE in function group {{P}}FG_LKR.
|
||||
- Use exactly the interface of {{P}}LKR_SAMPLE: the same parameter names, kinds,
|
||||
types, and exceptions.
|
||||
|
||||
# 5. Business rules
|
||||
1. If the number of days is less than 1, raise the exception INVALID_DAYS.
|
||||
2. The daily rate of a locker depends on its size code:
|
||||
- Size code S: 2.50 per day.
|
||||
- Size code M: 4.25 per day.
|
||||
- Size code L: 6.75 per day.
|
||||
3. The fee is the daily rate multiplied by the number of days.
|
||||
4. A member of the ski club pays 50 % of the fee.
|
||||
5. Round the fee half up to 2 decimals.
|
||||
|
||||
# 6. Constraints
|
||||
- Release target: 8.16.
|
||||
- Coding standards: Clean ABAP.
|
||||
- Out of scope: do not change {{P}}LKR_SAMPLE.
|
||||
|
||||
# 7. Acceptance
|
||||
- The function module is active and has no syntax error.
|
||||
- The hidden tests pass.
|
||||
- Write ABAP Unit tests for the function module in a global test class.
|
||||
Reference in New Issue
Block a user