Question: ASSIGNMENT 3 B Assignment 3 B tests your knowledge of strings in C + + ( Chapter 7 ) . Part 1 . Design a

ASSIGNMENT 3B
Assignment 3B tests your knowledge of strings in C++(Chapter 7).
Part 1. Design a program called YourName-Assignment3B (replace YourName with your actual name, no spaces)
that contains the following exact functions (with exact names, exact parameters, exact name of the parameters,
exact types of parameters, exact return values, and exact functionality):
Name Description/Functionality
Count A function1 with 2 string parameters S1 and S2 that counts all occurrences of a string
S1 inside a string S2(the 2 strings given as parameters) meaning how many times you
can find S1 in S22 and return it. The function should return 0 if S1 is not in S2. You can
find S1 in the string S2 multiple times, so, you will need to search the string S2
repeatedly until you reach the end of S2 or cannot find it anymore.
main The main function of the program should read lines from the attached
Assignment3BDataFile.txt file and for each Line, use the Count function to see how
many time times the word computer(in any cases e.g. Computer, computer,
COMPUTER3) can be found in Line, and add the returned line count to the total count for
the file, close the file, and outputs the total count.
Part 2. Implement the program in Visual Studio 2022: Create a C++ project called YourNameAssignment3B and
add your code to YourNameAssignment3B main function. Your program should be user-friendly (be well-
documented/commented (have comments for every line of code) and use only concepts learned in class so far
(so, do not use arrays, pointers, c-strings or array of string, lists, or any other concepts we did not learn in
Chapters 1 to 7).
Part 3. Create the screenshot document for your code and output: Create a Microsoft Word document from
the YourName-Assignment.docx template and call it YourName-Assignment3B.docx (replace YourName with
your actual name) Add to the document your complete screenshots of the Visual Studio editor window showing
the complete C++ source code for YourNameAssignment3B program and complete screenshots of the complete
output. If the entire class C++ source code or the output does not fit in one screenshot or the screenshots cannot
be easily read, create multiple screenshots, and add multiple screenshots to the document. Please keep the
screenshots in order.
Part 4. Submit your work: Submit YourName-Assignment3B.docx document on eCampus under the
Assignment 3B. Do not submit other types/formats of files (e.g. no CLASS, PDF, CPP, etc.). Please review the file
and resubmit if not correct.
1 With this exact name, parameters, return value, and definition. Here is the prototype:
int Count (string S1, string S2)
2 You can find S1 in the string S2 multiple times, so, you will need to search the string S2 repeatedly until you reach the
end of S2 or cannot find it anymore
3 Search for each one of the words and add them to your line count
ASSIGNMENT 3 B Assignment 3 B tests your

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 Accounting Questions!