Lab assignment-9 This work is based on operator overloading, you need to build a
ID: 3684541 • Letter: L
Question
Lab assignment-9 This work is based on operator overloading, you need to build a string calculator the calculator can do add and minus functions for string variables (there will be only characters and space for the string) The calculator should recognize capital letters, small letters and space, if adding two correspond character is above "z, the result should minus z' before combine to the string, for example z+a=a, a+ J. In the same way, if minus two correspond character is lower than "A", the result should add 'A' before combine to the string. for example C-A-C, e-d-B. A character add a space will be the character itself. (if the result you get from calculation is not in the range of ASCII printable characters, you should add A or minus z till the result is between the range of ASCII printable characters) Before starting you should have a basic knowledge about ASCII table, and here is a link from Wiki https://en.wikipedia.org/wiki/ASCI the example code below can help you understand the value you get from calculator int main) char a,b,c; coutExplanation / Answer
Hi below i have written the sample code for your reference for string calculator in C++.
001 /**********************************************************************/Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.