class fibonacciprogression(progression) """iterator producing generalized fibonacci progression "" def init (selffirst= second= ) """create new fibonacci progression first the first term of the progression (default second the second term of the progression (default ""start progression at first superinit (firstfictitious value preceding the first self prev second first def advance(self) """update current value by taking sum of previous two "" self prevself current self currentself prev self current code fragment class that produces fibonacci progression we use our progression framework to define new fibonacciprogression classas shown in code fragment this class is markedly different from those for the arithmetic and geometric progressions because we cannot determine the next value of fibonacci series solely from the current one we must maintain knowledge of the two most recent values the base progression class already provides storage of the most recent value as the current data member our fibonacciprogression class introduces new membernamed prevto store the value that proceeded the current one with both previous values storedthe implementation of advance is relatively straightforward (we use simultaneous assignment similar to that on page howeverthe question arises as to how to initialize the previous value in the constructor the desired first and second values are provided as parameters to the constructor the first should be stored as current so that it becomes the first one that is reported looking aheadonce the first value is reportedwe will do an assignment to set the new current value (which will be the second value reported)equal to the first value plus the "previous by initializing the previous value to (second first)the initial advancement will set the new current value to first (second firstsecondas desired testing our progressions to complete our presentationcode fragment provides unit test for all of our progression classesand code fragment shows the output of that test