A program to count words and numbers in a plain text file

Assignment Help Computer Engineering
Reference no: EM132194678

Write a C++ program to count words and numbers in a plain text file. Words and numbers can be repeated. You can use any algorithm and data structures that you prefer, as long as the results are correct.

It is preferred, but not necessary, that your algorithm is as efficient as possible, both in processing time as well as memory management.

The input is one text file, with words and integers, separated by any other symbols including spaces, commas, period, parentheses and carriage returns.

Keep in mind there can be be multiple separators together (e.g. many spaces, many commas together). The input is simple. You can assume a word is a string of letters (upper and lower case) and a number a string of digits (an integer without sign). Words and numbers will be separated by at least one non-letter or one non-digit symbol.

Length: You can assume one word will be at most 30 characters long and a number will have at most 10 digits. Repeated strings: words and numbers can be repeated.

However, you are not asked count distinct words or compute frequency per word, which require algorithms and data structures to be covered in the course.

Therefore, you just simply need to count word or numver occurrences. For this homework we will not ask you to consider all potential inputs. Notice you are not asked to handle floating point numbers, which require decimal point and scientific notation.

Reference no: EM132194678

Questions Cloud

Elasticity of demand for a given product or services : What are the two primary factors that determine the elasticity of demand for a given product or services?
Display all subsets of the characters : n the problem, your program should read n characters from a user and display all subsets of the characters.
Explain consistent patterns in feelings and behaviour : HPS307/791 PERSONALITY ASSESSMENT, DEAKIN UNIVERSITY, AUSTRALIA. Explain consistent patterns in thoughts, feelings and behaviour
How it distinguishes normal and inferior goods : Define income elasticity and how it distinguishes normal and inferior goods.
A program to count words and numbers in a plain text file : Words and numbers can be repeated. You can use any algorithm and data structures that you prefer, as long as the results are correct.
A program to calculates a vehicles gas mileage : The program should ask the user to enter the number of gallons of gas the vehicle can hold and the number of miles it can be driven on a full tank.
Write a description of the selected dataset and project : ITECH1103- Big Data and Analytics - write a brief reflection about this project in terms of challenges, learning and contribution
Calculate the monthly cost of a house given selling price : Write a C++ program to calculate the monthly cost of a house given the selling price, annual rate of interest, and number of years for the loan.
Market for housing as a result : Suppose that consumers begin to believe that the price of housing will be lower next period. What will happen in the market for housing as a result

Reviews

Write a Review

 

Computer Engineering Questions & Answers

  Use digital evidence examples to discuss type of evidence

Use digital evidence examples to discuss the type of evidence (as discussed in the attach).

  Discuss link state and distance vector routing types

Write essay on several examples of link state and distance vector routing types

  Design a program that asks the user to enter 10 golf scores

Design a program that asks the user to enter 10 golf scores. The scores should be stored in an Integer array.

  How would you go about assessing the current state of health

How would you go about assessing the current state of health IT governance and your organization's health IT governance capabilities.

  Discuss target countrys level of technology and connectivity

How might your target country's level of technology and connectivity affect your choices and the potential effectiveness of your plan

  Why using uml graphical notation

Using UML graphical notation, develop the design for the following system to explain the object classes and show the interaction of the data collection sub-systems (sequence diagrams).

  How you would buy a domain name and register it

Investigate how you would buy a domain name (like "mycooldomainname.org") and register it so that other users could find it.

  Convert a fahrenheit temperature to celsius or vice versa

Write a Python program that can convert a Fahrenheit temperature to Celsius, or vice versa.

  Analysis of network events of security attacks

As stated in the text, "Network Forensics is the capture, recording, and analysis of network events in order to discover the source of security attacks..."

  List some components of a modem block cipher

List some components of a modem block cipher. Define a P-box and list its three variations. Which variation is invertible?

  Write a java program that creates an array of integers

Write a java program that creates an array of integers

  Determine the amount of energy to be generate

Create a program of LU Decomposition to determine the amount of energy to be generate per reactor Type A, Type B, and Type C.

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