Hello, I am taking an introduction level course of C++. Since, Iam a beginner of programing, I amo t

Hello, I am taking an introduction level course of C++. Since, Iam a beginner of programing, I amo totally stuck on this assesment.Could you help me out ? PART 1:

1. Define a function to compare two strings s1 and s2. Thisfunction returns 0 if s1 = s2 and returns an integer equal to thesubtraction of the ASCII codes of the first two differentcharacters if s1 ? s2. For example, if s1 = “ABCD” and s2 = “ABE”,the function returns -2 because:

the ASCII code of ‘C’ – the ASCII code of E = -2.

As another example, this function returns 65 if s1 = “ABA” and s2 =“AB” (the ASCII Code of ‘A’ – the ASCII Code of ‘ ’.)

2. Define a function to count to number of lowercase and uppercaseletters in an input string. DO NOT DEFINE TWO SEPARATE FUNCTIONS.Use the functions in the “cctype” header file in thisfunction.

3. Define a function to append a string to the end of anotherstring.

Note:

Use the const keyword in the parameter list of the above-mentionedfunctions when appropriate.

PART 2:

Write a program that reads 10 strings from keyboard and stores themin an array. This program then uses the functions definedin Part 1 to display the following information on thescreen:

1. The minimum and the maximum string in the list.

2. For each string in the list, this program displays the stringitself followed by the total number of its lowercase, the totalnumber of its uppercase, and the total number of its non-alphabeticcharacters.

3. This program then concatenates all the 10 strings into a newstring and displays it on the screen. My instructor required us to build a program, consisiting of 4parts : main function, and three sub functions. At the same time, Iam not allowed to use string function; I have to use C-strings. I’ve already comfirmed that the program for Part 1 workedwithout any problem. However, I had a lot of errors, includingsyntax errors and throwing of erros anf felt difficulties in Part 2. My understanding to concepts of C++ is not enough, so I can’teven know which parts in my program I have to fix, and how I can dothat. Please check my programs and help me. My program is : #include #include using namespace std; int CompareStrings(const char String1[], const charString2[]); void countLowerUpper(char imput[], int &sumLower, int&sumUpper); void appendStrings( char*, const char *); int main() { const int sizeString1 = 10; // define the size of string1 const int sizeString2 = 10; // define the size of string2 int result; // To hold the result of comparing // for No1 of Part1 // char String1[sizeString1]; char String2[sizeString2]; cout << “Enter characters :”; cin.getline(String1, sizeString1); cout << “characters you entered are :” << String1<< endl; cout << “Enter chracters again :”; cin.getline(String2, sizeString2); cout << “characters you entered are ; ” << String2<< endl; result = CompareStrings(String1, String2); cout << String1<< endl; if (result == 0) cout << “two characters are same ” << endl; else cout << “the substraction of two characters is ” <

0) max = strings[i]; if (CompareStrings(strings[i], min) . . .

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.