Redo the author's solution to problem 9 from section 6.9 with the following changes/notes:

Use PROCs well to break your program into re-usable parts. (You should understand the value of modularization by this stage in your programming course-work/career, right? It will also serve you well when we learn to make our own 'link libraries'.)


This assignment is Level 3.

Option

Add (Level 4) to time how long it takes for the user to enter their keystroke between messages. Depending on this length of time, adjust the weights in the table by the following amounts:

Time Frame (ms)White AdjustmentBlue Adjustment Green AdjustmentRed Adjustment
0-3000-10%+20%-5%-5%
3001-6000+10%+5%-5%-10%
6001-10000-5%+15%-15%+5%
10001--10%-30%+25%+15%

No weight can be less than 0% or greater than 100% and the total of the weights cannot exceed 100%. To help debug and demonstrate this aspect, display the entry time, the 4 weights, and their total in addition to your line in a random color.