drbitboy
Lifetime Supporting Member
I thinks its just a homework assignment and not really an engineered solution.
Never stopped the OCD among us before; that is why SteveB said "extra credit."
Learning to write code is only the first (and easiest step); to learn to visualize incosistencies between the process model and the program is what the best coders will do i.e. the ones who will not put people in danger someday down the road when they are on their own.
Not that this diverter or assignment is dangerous, but if it starts to click with the OP what they are actually doing, they will be far better off for it.