Pipeline controller: plan 2 (hard +, error +50 %), backlog throttle, 2 trajectory workers, stop rules, summaries every 50; budget reserve
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
56
tasks_gen/train/G1005/spec.md
Normal file
56
tasks_gen/train/G1005/spec.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# 1. Goal
|
||||
|
||||
A furniture shop sells furniture on instalment plans. A checkout program calls one
|
||||
check before the shop grants an instalment plan to a customer. The program needs
|
||||
one reason code for each customer.
|
||||
|
||||
# 2. Open questions
|
||||
|
||||
None.
|
||||
|
||||
# 3. Context
|
||||
|
||||
- The interface {{P}}IF_CREDIT_CHECK exists in package $TMP. It is active.
|
||||
- The interface declares the type of the reason, the type of a money amount, the
|
||||
constants of the reason codes, and one method.
|
||||
- The method name, the parameter names and the parameter types are not in this
|
||||
document. Read the interface in the system.
|
||||
- The reason constants have the names OK, AGE, INCOME, OPEN_PLAN and LIMIT.
|
||||
|
||||
# 4. Contract
|
||||
|
||||
- Create the class {{P}}CREDIT_CHECKER in package $TMP.
|
||||
- The class is public and final. It has a public constructor without parameters.
|
||||
- The class implements the interface {{P}}IF_CREDIT_CHECK.
|
||||
- Do not add other public methods.
|
||||
|
||||
# 5. Business rules
|
||||
|
||||
The check receives the age of the customer in years, the net monthly income of the
|
||||
customer, the number of open instalment plans of the customer, and the amount of
|
||||
the new order. Apply the rules in this sequence. Return the reason of the first
|
||||
rule that fails.
|
||||
|
||||
1. If the age is less than 18, return AGE.
|
||||
2. If the net monthly income is zero or less, return INCOME.
|
||||
3. If the number of open instalment plans is 2 or more, return OPEN_PLAN.
|
||||
4. Calculate the credit limit:
|
||||
- Start with three times the net monthly income.
|
||||
- Subtract 500 for each open instalment plan.
|
||||
- If the age is less than 21, halve the limit and round the result down to
|
||||
whole euros. Example: 3750.75 becomes 3750.00.
|
||||
5. If the amount of the new order is more than the credit limit, return LIMIT.
|
||||
6. Else return OK.
|
||||
|
||||
# 6. Constraints
|
||||
|
||||
- Release target: SAP_BASIS 8.16 (ABAP Platform 2025).
|
||||
- Coding standards: Clean ABAP. Method length below 40 statements. No global
|
||||
variables. No comment that restates the code.
|
||||
- Out of scope: do not change the interface {{P}}IF_CREDIT_CHECK.
|
||||
|
||||
# 7. Acceptance
|
||||
|
||||
- The class is active and has no syntax error.
|
||||
- The hidden tests pass.
|
||||
- Write your own ABAP Unit tests for the class.
|
||||
Reference in New Issue
Block a user