Unit 2 Lesson 11 slideshow Missed Opportunity?

On slide 9 the most obvious decomposition is top and bottom since they are identical.

Let’s not forget abstraction. paint_line(painter, color). How about paint_two_color_line(painter, color_1, color_2).

So instead:

Functions:
paint_half(painter)
paint_line(painter, color)
paint_two_color_line(painter, color_1, color_2)