Stage 2 summary at 50 accepted trajectories
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
45
tasks_gen/train/G1119/spec.md
Normal file
45
tasks_gen/train/G1119/spec.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# 1. Goal
|
||||
A bookbinding workshop prices binding jobs. The order desk calls one function
|
||||
module for each job. The function module calculates the fee of the job and
|
||||
reports whether the job is a rush job.
|
||||
|
||||
# 2. Open questions
|
||||
None.
|
||||
|
||||
# 3. Context
|
||||
- Function group {{P}}FG_BIND exists in package $TMP.
|
||||
- Function module {{P}}BIND_SAMPLE exists in this group. It shows the interface
|
||||
that the order desk uses.
|
||||
|
||||
# 4. Contract
|
||||
- Create the function module {{P}}BIND_FEE in function group {{P}}FG_BIND.
|
||||
- The interface of {{P}}BIND_FEE:
|
||||
- importing iv_binding TYPE string
|
||||
- importing iv_pages TYPE i
|
||||
- importing iv_member TYPE abap_bool
|
||||
- exporting ev_rush TYPE abap_bool
|
||||
- changing cv_fee TYPE decfloat34
|
||||
- exceptions invalid_pages
|
||||
|
||||
# 5. Business rules
|
||||
1. If the number of pages is less than 1, raise the exception INVALID_PAGES.
|
||||
2. Set the rush flag to false, except in rule 7.
|
||||
3. Binding type PB: the fee is 0.05 per page, rounded half up to 2 decimals.
|
||||
4. Binding type HB: the fee is 0.12 per page, rounded half up to 2 decimals.
|
||||
The minimum fee for hardback binding is 15.00.
|
||||
5. A member receives a discount of 10 % on the fee. The discount is the last
|
||||
step of the calculation and is applied after the minimum fee of rule 4.
|
||||
6. The minimum fee of rule 4 is the last step of the calculation and is applied
|
||||
after all discounts.
|
||||
7. Binding type EX: set the rush flag to true. The fee is 0.20 per page,
|
||||
rounded half up to 2 decimals.
|
||||
8. Other binding types: the fee is 0.
|
||||
|
||||
# 6. Constraints
|
||||
- Release target: 8.16.
|
||||
- Coding standards: Clean ABAP.
|
||||
- Out of scope: do not change {{P}}BIND_SAMPLE.
|
||||
|
||||
# 7. Acceptance
|
||||
- The function module is active and has no syntax error.
|
||||
- Write ABAP Unit tests for the function module in a global test class.
|
||||
Reference in New Issue
Block a user