Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(please make sure for the answer you post it extacly like how you would paste it into visual studio for C++.) You've been hired by

(please make sure for the answer you post it extacly like how you would paste it into visual studio for C++.)

You've been hired by mReadability Robins to write a C++ console application that analyzes a paragraph for readability using the ColemanLiau

index. Define a paragraph of text as a constant (paragraph examples are below). Calculate and format the following twelve outputs into two formatted columns:

String length.

Number of alphanumeric characters.

Number of punctuation characters.

Number of spaces.

Number of any other characters this should be zero.

The sum of the previous four counts this should equal the string length.

Number of sentences assume each sentence ends with a period (.).

Number of words assume this is the number of spaces plus one.

Number of letters in words this is the number of alphanumeric

characters.

L = (number of letters in words) words 100.

S = sentences words 100.

(ColemanLiau Index) CLI = (0.0588 L) (0.296 S) 15.8.

The first column is a left-justified label. The second column is a right-justified

value. Format all real numbers to two decimal places. Use a for statement to loop through the paragraph to test each of its characters. Use the boolean character

functions available in Canvas app String and character functions to determine character types. Use formatted output manipulators to print the output. To test your application, use this test paragraph (which should be defined as a string constant):

Existing computer programs that measure readability are based largely upon subroutines which estimate number of syllables, usually by counting vowels. The shortcoming in estimating syllables is that it necessitates keypunching the prose into the computer. There is no need to estimate syllables since word length in letters is a better predictor of readability than word length in syllables. Therefore, a new readability formula was computed that has for its predictors letters per 100 words and sentences per 100 words. Both predictors can be counted by an optical scanning device, and thus the formula makes it economically feasible for an organization such as the US Office of Education to calibrate the readability of all textbooks for the public school system.

For this test paragraph, the output should look like this::

Welcome to Readability Robins

-----------------------------

String length: 765

Alphanumeric chars: 639

Punctuation chars: 8

Spaces: 118

Unknowns: 0

String length check: 765

Sentences: 5

Words: 119

Letters in words: 639

L: 536.97

S: 4.20

CLI: 14.53

End of Readability Robins

Run the program with this paragraph:

Apollo 11 was the spaceflight that landed the first two humans on the Moon.

Mission commander Neil Armstrong and pilot Buzz Aldrin, both American, landed

the lunar module Eagle on July 20, 1969. Armstrong became the first to step onto

the lunar surface six hours later on July 21. Aldrin joined him about 20 minutes

later. They spent about two and a quarter hours together outside the spacecraft, and

collected lunar material to bring back to Earth. Michael Collins piloted the

command module Columbia alone in lunar orbit while they were on the Moon's

surface. Armstrong and Aldrin spent just under a day on the lunar surface before

rendezvousing with Columbia in lunar orbit.

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

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions

Question

2. What kind of team is it?

Answered: 1 week ago

Question

What is American Polity and Governance ?

Answered: 1 week ago

Question

4. What will the team agreement contain?

Answered: 1 week ago