Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

Explain Decentralization and Declassification

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago