Display the digit count with a label

Assignment Help Computer Engineering
Reference no: EM132105163

Problem solving and debugging.

Linux redirection to read data from a file.

Use of conditional loop (while).

Data File Description
A data file for this exercise will consist of several lines of text that form sentences. The text may include letters, punctuation marks, and/or digits. Each sentence will be terminated with either a period (.), an exclamation mark (!), or a question mark (?).

Design and implement a complete C++ program that will

using Linux redirection, read the contents of the file and

compute the average number of letters per sentence in the file

count the number of digits in the file

display the average with a label and 3 digits to the right of the decimal

display the digit count with a label


NOTES:

Make sure you choose enough test data to ensure that your program meets all the requirements.

If you use any library functions in your program make sure you include the appropriate header file(s).

Sample terminal session:
[keys]$ more data4eight
What is Earth Day? Earth Day is
celebrated annually on April 22 to demonstrate support for
environmental protection. It was first marked
in 1970 and is coordinated globally by the
Earth Day Network. More than
193 countries participate each year.
[keys]$ g++ ex08.cpp
[keys]$ ./a.out < data4eight

Average # of letters per sentence is 48.250
Total # of digits in the file is 9

**EXTRA NOTES:
-This does NOT use fstream. Input will be taken through cin.
-String cannot be used. The program can be created without it.
-USE A WHILE LOOP.
-Do not use functions, arrays, or strings.
Part of my program:

#include <iostream>
#include <cctype>
using namespace std;

int main()
{

cin >> data;
while (cin)
{

cin >> data;
}


return 0;
}

Reference no: EM132105163

Questions Cloud

Various schedule compression techniques : What are the drawbacks to various schedule compression techniques?
Write one program and display the results at the same time : Write one program and display the results at the same time. You must use the Debian version of the UNIX operating system.
What is the importance of operational management : What is the importance of operational management to any establishment or business?
Assess the environmental factors associated : How should a project manager assess the environmental factors associated with their projects and who should be included in these assessments?
Display the digit count with a label : Design and implement a complete C++ program that will using Linux redirection, read the contents of the file.
What are the attributes to project delays : What are the attributes to project delays and taking longer periods than scheduled? help in expounding this.
How can the procurement process be reviewed : How can the procurement process be reviewed at the end of the project - Which includes lessons learned and any ideas for future projects?
Implementation of the merge sort or quick sort : The first line of each input file will have a single positive integer k (1
Advantages and disadvatages of scope reduction : What are the advantages and disadvatages of Scope Reduction?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd