Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

On the student CD you will find a file named text.txt. Write aprogram that reads

ID: 3615450 • Letter: O

Question

On the student CD you will find a file named text.txt. Write aprogram that reads the file's contents and determines thefollowing: *The number of uppercase letters in the file *The number of lowercase letters in the file *The number of digits in the file *The number of whitespaces characters in the file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text.txt
No one is unaware of the name of that famous Englishshipowner, Cunard. In 1840 this shrewd industrialist founded a postal servicebetween Liverpool and Halifax, featuring three wooden ships with400-horsepower paddle wheels and a burden of 1,162 metrictons. Eight years later, the company's assets were increased by four650-horsepower ships at 1,820 metric tons, and in two more years,by two other vessels of still greater power and tonnage. In 1853 the Cunard Co., whose mail-carrying charter had justbeen renewed, successively added to its assets the Arabia, thePersia, the China, the Scotia, the Java, and the Russia, all shipsof top speed and, after the Great Eastern, the biggest ever to plowthe seas. So in 1867 this company owned twelve ships, eight with paddlewheels and four with propellers. If I give these highly condensed details, it is so everyonecan fully understand the importance of this maritime transportationcompany, known the world over for its shrewd management. No transoceanic navigational undertaking has been conductedwith more ability, no business dealings have been crowned withgreater success. In twenty-six years Cunard ships have made 2,000 Atlanticcrossings without so much as a voyage canceled, a delay recorded, aman, a craft, or even a letter lost. Accordingly, despite strong competition from France,passengers still choose the Cunard line in preference to allothers, as can be seen in a recent survey of officialdocuments. Given this, no one will be astonished at the uproar provokedby this accident involving one of its finest steamers.
*The number of uppercase letters in the file *The number of lowercase letters in the file *The number of digits in the file *The number of whitespaces characters in the file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text.txt
No one is unaware of the name of that famous Englishshipowner, Cunard. In 1840 this shrewd industrialist founded a postal servicebetween Liverpool and Halifax, featuring three wooden ships with400-horsepower paddle wheels and a burden of 1,162 metrictons. Eight years later, the company's assets were increased by four650-horsepower ships at 1,820 metric tons, and in two more years,by two other vessels of still greater power and tonnage. In 1853 the Cunard Co., whose mail-carrying charter had justbeen renewed, successively added to its assets the Arabia, thePersia, the China, the Scotia, the Java, and the Russia, all shipsof top speed and, after the Great Eastern, the biggest ever to plowthe seas. So in 1867 this company owned twelve ships, eight with paddlewheels and four with propellers. If I give these highly condensed details, it is so everyonecan fully understand the importance of this maritime transportationcompany, known the world over for its shrewd management. No transoceanic navigational undertaking has been conductedwith more ability, no business dealings have been crowned withgreater success. In twenty-six years Cunard ships have made 2,000 Atlanticcrossings without so much as a voyage canceled, a delay recorded, aman, a craft, or even a letter lost. Accordingly, despite strong competition from France,passengers still choose the Cunard line in preference to allothers, as can be seen in a recent survey of officialdocuments. Given this, no one will be astonished at the uproar provokedby this accident involving one of its finest steamers.
No one is unaware of the name of that famous Englishshipowner, Cunard. In 1840 this shrewd industrialist founded a postal servicebetween Liverpool and Halifax, featuring three wooden ships with400-horsepower paddle wheels and a burden of 1,162 metrictons. Eight years later, the company's assets were increased by four650-horsepower ships at 1,820 metric tons, and in two more years,by two other vessels of still greater power and tonnage. In 1853 the Cunard Co., whose mail-carrying charter had justbeen renewed, successively added to its assets the Arabia, thePersia, the China, the Scotia, the Java, and the Russia, all shipsof top speed and, after the Great Eastern, the biggest ever to plowthe seas. So in 1867 this company owned twelve ships, eight with paddlewheels and four with propellers. If I give these highly condensed details, it is so everyonecan fully understand the importance of this maritime transportationcompany, known the world over for its shrewd management. No transoceanic navigational undertaking has been conductedwith more ability, no business dealings have been crowned withgreater success. In twenty-six years Cunard ships have made 2,000 Atlanticcrossings without so much as a voyage canceled, a delay recorded, aman, a craft, or even a letter lost. Accordingly, despite strong competition from France,passengers still choose the Cunard line in preference to allothers, as can be seen in a recent survey of officialdocuments. Given this, no one will be astonished at the uproar provokedby this accident involving one of its finest steamers.

Explanation / Answer

Dear, //Header files #include #include using namespace std; //main function int main() { char ch;//to read character from file //to keep track counters int uppercase=0,lowercase=0,digits=0,spaces=0; //opening file ifstream infile("text.txt"); //if opening fails display error message and //exit from program if(infile.fail()) { cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote