Question: Project Overview: Programming involves typing. You are curious how much effort it takes to type a C program (or a paper for your English class,
Project Overview: Programming involves typing. You are curious how much effort it takes to type a C program (or a paper for your English class, or whatever). This project assumes you are a touch typist. It captures the keystrokes that each of your fingers (index, middle, ring, pinky) makes when typing a block of text and prints some basic statistics regarding your typing.
The diagram at the right shows what fingers are used for each of the different keys. For our project, we will make a couple of simplifying assumptions:
We will never use the Caps-Lock or TAB or Ctrl or Alt or Backspace keys.
We ignore white space. We assume there is a single space or tab or newline between tokens/strings, but we do not count this in our totals (since we do not know what finger you used to generate the white space).
When entering a capital letter (or any punctuation character that uses the Shift key), then you count two fingers in action (two keystrokes the finger pressing that key plus the pinky finger of the other hand). For example, typing a # is two keystrokes the left middle finger (for the 3 key) and the right pinky (for the Shift key).
For this program, you need to identify the number of keystrokes that each finger performed when typing a block of text. Two sample executions of the program are shown below (input in red, expected output in blue). You can assume that no one single token/string in the input will ever be longer than 50 characters.
| The quick brown fox jumps over the lazy old zebra or cat or dog. control-d 14 strings entered 2 typed using only the left hand 0 typed using only the right hand 52 total keystrokes 13 Left index 8 Left middle 3 Left ring 6 Left pinky 8 Right index 2 Right middle 10 Right ring 2 Right pinky | #include int main (void) { printf( "Roll Tide " ); return 0; } 13 strings entered 0 typed using only the left hand 1 typed using only the right hand 74 total keystrokes 11 Left index 9 Left middle 1 Left ring 11 Left pinky 10 Right index 8 Right middle 10 Right ring 14 Right pinky control-d |

OOOOOOOOOOOED Backspaco Backspace Tap Caps Lock copi od OEDCELLOOO enter "OZ ECLERMOLE* Shift Shift CtrlU Ctrl |At || Uctrl Alt
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
