Question: Please create a function aka header file. for the following question in CPP. 3. Broken Key on the Keyboard Suppose we have a user, where

Please create a function aka header file. for the following question in CPP.

Please create a function aka header file. for the following question in

3. Broken Key on the Keyboard Suppose we have a user, where we ask them to confirm their name. We already know their name, but they enter a text that's different from what we have on record. Write a function that takes in two strings, the expected string, and the actual string we recieved, and determine whether we should display a message saying "A key on your keyboard might be broken". A broken key is defined as follows: the user pressed it, but it did not appear in the string. Function signature: bool broken_keys(std::string expected, std::string actual) Example: Input: expected="ANGELO", actual="ANELO" Output: true Explanation: Since we were expecting to see ANGELO, and the user wrote ANELO, they missed the G. It is possible that they pressed it but it did not register, hence the possibility of a broken key. Input: expected="TOM", actual="TOM" Output: false Explanation: We have no evidence of a broken key here, because all the chars we expeced have been entered

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!