Appearance
Lesson 2 Practice — Number Analyzer
Create:
text
ZCL_ABAP_L02_PRACTICE_###Requirements
Create an internal table containing at least 10 integers.
Write methods:
text
SUM
COUNT_EVEN
COUNT_GREATER_THAN
MINIMUM
MAXIMUMCOUNT_GREATER_THAN must import a threshold.
Your main method should:
- build the internal table;
- print each value with its index;
- call every method;
- print the results.
Additional task
Create a second internal table of circle radii and call a CIRCLE_AREA method for each radius.
Reasoning
- Why is this data not persistent?
- When is
sy-tabixmeaningful? - What can happen if
numbers[ 50 ]is evaluated when no such line exists? - Why might a method be clearer than putting every calculation in
main? - When is
VALUEpreferable to repeatedAPPENDstatements?