Files
abap/exercises/practice/grains/zcl_grains.clas.abap
Marian Zeis d067e42cc2 New exercise: Grains (#44)
* new exercise grains

* change config.json to random place

* add missing bracket in config.sjon

* remove solution from template

* change from decfloat to p

* change from decfloat to p

* linting

* add abapGit Config

Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
2022-06-08 14:00:38 +02:00

37 lines
619 B
ABAP

CLASS zcl_grains DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
TYPES type_result TYPE p LENGTH 16 DECIMALS 0.
METHODS square
IMPORTING
input TYPE i
RETURNING
VALUE(result) TYPE type_result
RAISING
cx_parameter_invalid.
METHODS total
RETURNING
VALUE(result) TYPE type_result
RAISING
cx_parameter_invalid.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_grains IMPLEMENTATION.
METHOD square.
" add solution here
ENDMETHOD.
METHOD total.
" add solution here
ENDMETHOD.
ENDCLASS.