The programming challenge is to implement a non-graphical C++ program to meet th
ID: 3635399 • Letter: T
Question
The programming challenge is to implement a non-graphical C++ program to meet the following
requirements:
1. Implement a simple grammar checker program.
2. It should read text from standard input and display a suitable error message for some specific rules
(listed below).
3. Use only standard C++ library functions.
4. Use your own discretion in the design but we would like to see an object-oriented approach.
5. You can add additional features if you wish but you will be evaluated more on the quality of the
code rather than features.
The program should flag these errors in the input:
1. First word in a sentence not capitalized.
2. A word capitalized that is not the first word in a sentence. Your program should not report the
following words as an error if they are capitalized: America, C++, Canada, English, French, I, ICS,
Spanish
Assume sentences are terminated by a period ("."), question mark ("?"), or exclamation mark ("!").
Assume words are separated by any whitespace character (space, comma, colon, period, semicolon,
form-feed, newline, carriage return, horizontal tab, or vertical tab).
Explanation / Answer
#include #include #include #include #include #include int j=0,s1,s2,k,i,f; int gdriver = EGA,gmode = DETECT; char t[10][10] = {''},tp,al,cha={''}; void choice(); void text(); void present(); void past(); void future(); void background(); void main() { clrscr(); choice(); getch(); } void background() { clrscr(); initgraph(&gdriver,&gmode,""); setbkcolor(15); } void choice() { int n; clrscr(); gotoxy(30,8); coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.