Stage 2 summary at 50 accepted trajectories
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
54
tasks_gen/train/G1078/spec.md
Normal file
54
tasks_gen/train/G1078/spec.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# 1. Goal
|
||||
Calculate the emptying fee for one septic tank. The depot program calls one
|
||||
function module for each emptying job. The function module must have the same
|
||||
interface as the sample function module, because the depot program calls all fee
|
||||
modules in the same way.
|
||||
|
||||
# 2. Open questions
|
||||
None.
|
||||
|
||||
# 3. Context
|
||||
- Function group {{P}}FG_SEWER exists in package $TMP.
|
||||
- Function module {{P}}SEWER_SAMPLE exists in this group. It is the sample fee
|
||||
module. Its interface is the interface that all fee modules must use.
|
||||
- A drainage company empties septic tanks. The depot program sends the size of
|
||||
the tank, the distance from the depot, and the connection type of the
|
||||
property.
|
||||
|
||||
# 4. Contract
|
||||
- Create the function module {{P}}SEWER_FEE in function group {{P}}FG_SEWER.
|
||||
- Use exactly the interface of {{P}}SEWER_SAMPLE:
|
||||
- importing iv_tank_litres type i
|
||||
- importing iv_distance_km type i
|
||||
- importing iv_mains_sewer type abap_bool
|
||||
- exporting ev_skip type abap_bool
|
||||
- changing cv_fee type decfloat34
|
||||
- exception invalid_litres
|
||||
|
||||
# 5. Business rules
|
||||
1. If iv_tank_litres is less than 1, raise the exception INVALID_LITRES.
|
||||
2. Set the skip flag to false. Rule 4 is the only exception.
|
||||
3. The base fee is 75.00. The base fee covers the first 1000 litres of the
|
||||
tank.
|
||||
4. If the property is connected to the mains sewer, no emptying is necessary.
|
||||
Set the skip flag to true and do not change the fee. Do not apply rules 5
|
||||
to 7.
|
||||
5. Each started 500 litres above 1000 litres adds 20.00 to the fee. Example:
|
||||
1000 litres add 0.00, 1001 litres add 20.00, 1500 litres add 20.00, and
|
||||
1501 litres add 40.00.
|
||||
6. The travel fee is 1.50 for each kilometre of iv_distance_km. The travel fee
|
||||
is not more than 60.00.
|
||||
7. The fee is the base fee of rule 3 plus the volume fee of rule 5 plus the
|
||||
travel fee of rule 6. The fee is not more than 900.00.
|
||||
|
||||
# 6. Constraints
|
||||
- Release target: 7.40 SP05. Use only syntax that exists in 7.40 SP05. Do not
|
||||
use syntax that is newer than 7.40 SP05.
|
||||
- Out of scope: do not change {{P}}SEWER_SAMPLE.
|
||||
- Coding standards: Clean ABAP. A method has less than 40 statements.
|
||||
- Out of scope: no database access, no ALV, no dynpro.
|
||||
|
||||
# 7. Acceptance
|
||||
- The function module {{P}}SEWER_FEE 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