I wrote some programs for learning abstract and concrete. At first I made a subroutine Average(). This routine calculates (a + b) / 2. The concept average is a special (concrete) case of a wider concept. Secondly, I made a subroutine Intermediate(). The concept of this routine is wider and more abstract than Average(). Intermediate() needs one more parameter k. And if k = 0.5, the result is the same as Average(). The output of this program is:
Average(a=10, b=20) = 15 Intermediate(a=10, b=20, k=0) = 10 Intermediate(a=10, b=20, k=0.25) = 12.50 Intermediate(a=10, b=20, k=0.50) = 15.00 Intermediate(a=10, b=20, k=0.75) = 17.50 Intermediate(a=10, b=20, k=1.00) = 20.00 Press any key to continue...
The code is here.
I sometimes use the code like Intermediate(). So I also wrote application samples of Intermediate() for points and colors. The program ID is HRX565-0. This program is also text base.
One more sample is HRX565-1. This is a graphical demo animation program for these concepts.