Question
Asked by:
a7med
a7med
Rating : No Rating
Questions Asked: 1
Tutorials Posted: 0
 

$12.00 CPS 150 , C++ problem

Q:
This information is taken from http://en.wikipedia.org/wiki/Automated_Readability_Index. The Automated Readability Index (ARI) is a computed value that estimates the understandability of text. You are to write a program that inputs text and calculates the ARI using the formula below:
ARI = 4.71(total_characters / words) + 0.5(words/sentences) – 21.43
In calculating the number of characters, don’t count punctuation. For this assignment, you may assume that
• All sentences end with . ? or !
• Other punctuation characters will be limited to , ; :
Your program should prompt the user for the name of a file containing text to be processed. After processing, display
• number of characters (not including spaces and punctuation)
• number of words
• number of sentences
• ARI score
Sample input (from page 404 of the CPS 150 textbook with extra punctuation) and associated output.

Abstraction occurs in programming as well. In order to focus on the
bigger picture of creating a working application, a programmer needs
to be able to use certain objects and routines without having to be
concerned about the details of their implementation! You have been
doing this since the beginning of this text when you used objects
such as cin, and cout and functions such as pow and sqrt? All you
need to know: to use the objects, or functions; is what they do and
the interface, for using them.
 


   
   
   
   
 
Available Tutorials to this Question
Posted by:
bricefabber
bricefabber
Rating (15): A+
Questions Asked: 0
Tutorials Posted: 55, earned $237.46
 

$9.50 Working C++ solution program

  • This tutorial was purchased 1 time and rated A+ by students like you.
  • Posted on Mar 11, 2009 at 6:31:18PM
A:
Preview: ... I ran it on the sample text you provided and double checked ...

The full tutorial is about 44 words long plus attachments.

Attachments:
ari.cpp (1K)
Posted by:
rainman
rainman
Rating (40): A+
Questions Asked: 2
Tutorials Posted: 174, earned $906.64
 

$10.00 C++ ARI Tutorial. Compiled, Tested, Commented Works.

  • This tutorial hasn't been purchased yet.
  • Posted on Mar 11, 2009 at 6:42:20PM
A:
Preview: ... sentences++;<br> else if ((buffer[i] == ',') || (buffer[i] == ';') || (buffer[i] == ':'))<br> {<br> ;<br> //it says nothing about counting these; we just leave them out so they wont be counted as characters<br> //we could have also added -, ", <,>,+,@#$%^&*(), etc but directions didn't call for it<br> //<br> ...

The full tutorial is about 549 words long plus attachments.

Attachments:
main.cpp (1K) (Preview)
   
Join Now or Log In
Get Tutoring
Get Paid
Academic Honesty