Generator: pilot analysis and fixes; G0002-G0021 tasks; handover notes merged
- Static bundle checks (name length, seed type, reserved words, contract test classes, testclasses_file), local abaplint parser check before SAP, max_tokens, robust JSON parse - Runner: G2 for CDS views with parameters, contract_check detail in report - G0020 and G0013 fixed by review and revalidated (oracle 100, null 0) - Pilot results in docs/faz1-tasarim.md 11e; handover notes merged into CLAUDE.md and docs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
57
tasks_gen/eval/G0007/spec.md
Normal file
57
tasks_gen/eval/G0007/spec.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# 1. Goal
|
||||
A retail company gives loyalty discounts to its customers. A checkout program needs
|
||||
three values: the loyalty tier of a customer, the discount percent of a tier, and
|
||||
the number of points that a customer still needs for the next tier. The program
|
||||
calls one class for these three values.
|
||||
|
||||
# 2. Open questions
|
||||
None.
|
||||
|
||||
# 3. Context
|
||||
- The interface {{P}}IF_LOYALTY_RULES exists in package $TMP. It is active.
|
||||
- The interface declares the type of a point value, the type of a tier, the
|
||||
constants for all tiers, and three methods. This document does not repeat the
|
||||
signature of the interface. Read the interface before you start.
|
||||
- The three methods are:
|
||||
* the method that returns the tier for a point value,
|
||||
* the method that returns the discount percent of a tier,
|
||||
* the method that returns the number of points that are missing for the next tier.
|
||||
|
||||
# 4. Contract
|
||||
- Create the class {{P}}LOYALTY_EVALUATOR in package $TMP.
|
||||
- The class is public and final. It has a public constructor without parameters.
|
||||
- The class implements {{P}}IF_LOYALTY_RULES.
|
||||
- Do not add other public methods.
|
||||
|
||||
# 5. Business rules
|
||||
Tier of a point value:
|
||||
1. A point value below zero counts as zero.
|
||||
2. 0 to 999 points is the basic tier.
|
||||
3. 1000 to 4999 points is the silver tier.
|
||||
4. 5000 to 19999 points is the gold tier.
|
||||
5. 20000 points and more is the platinum tier.
|
||||
|
||||
Discount percent of a tier:
|
||||
6. basic is 0 percent.
|
||||
7. silver is 3 percent.
|
||||
8. gold is 7 percent.
|
||||
9. platinum is 12 percent.
|
||||
10. Any other tier value is 0 percent.
|
||||
|
||||
Points to the next tier:
|
||||
11. A point value below zero counts as zero.
|
||||
12. basic needs 1000 points minus the point value.
|
||||
13. silver needs 5000 points minus the point value.
|
||||
14. gold needs 20000 points minus the point value.
|
||||
15. platinum needs 0 points.
|
||||
|
||||
# 6. Constraints
|
||||
- Release target: 8.16.
|
||||
- Coding standards: Clean ABAP. Methods below 40 statements. No global variables.
|
||||
No comment that restates the code.
|
||||
- Out of scope: do not change {{P}}IF_LOYALTY_RULES.
|
||||
|
||||
# 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