Design a program that will read a series of titles

Assignment Help C/C++ Programming
Reference no: EM132082659

New Skills Practiced (Learning Goals)

Problem solving and debugging.

User-defined functions.

C++ strings.

Design a program that will read a series of titles from an input file (via Linux redirection), one per line.

The titles will be in an unorthodox mix of upper and lowercase letters and words may be separated by more than 1 blank.

Reformat each title so that

the first character (if it is a letter) of each word is capitalized and all remaining letters are lowercase

each word is separated by exactly one blank space

For example, "thE CAT in tHe hat" becomes "The Cat In The Hat".

REQUIREMENTS

At least one function (in addition to main) must be used.

The string data type must be used.

Never use global variables.

Never use goto statements.

File can only be read one time.

The required output (displayed to the screen) from the program is

a list of the reformatted titles, one per line

ASSUMPTIONS

The input file will not be empty.

There will be one title per line.

Each title will consist of 1 or more words.

There will be no leading spaces before the first word in the title.

There will be at least 1 blank space between each word (there may be more).

There will be a linefeed after the last character of the last word in a title (no trailing blanks).

The program need only attempt to capitalize the first character of a word. For example, if a word in the title is "9TH", it should be reformatted to "9th". In other words, the program does not have to find the first letter in a word and capitalize it.

NOTES:

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

Sample terminal session:

[keys]$ more data4ten
the 5TH wAVE
the cAT in thE HAT
onE fish two FISh red fISh bLuE Fish
[keys]$ g++ exercise10.cpp
[keys$ ./a.out < data4ten

The 5th Wave
The Cat In The Hat
One Fish Two Fish Red Fish Blue Fish

Reference no: EM132082659

Questions Cloud

How does pluralism and democratic theory : How does pluralism and democratic theory benefit from direct law making?
Which approach do you recommend for love you : What are some of the various ways that analytics might be better coordinated? Which approach do you recommend for Love You?
What is the limit of their modified AGI : If limits apply, then what is the limit of their modified AGI in order for the Jenkins to be able to contribute to a Roth IRA
Difference between political structures and political : What is the difference between political structures and political institutions?
Design a program that will read a series of titles : Design a program that will read a series of titles from an input file (via Linux redirection), one per line.
Provide a basic network security plan : The new Exam Company, which will specialize in hosting online examinations, has just hired you to be the network administrator responsible for all network.
Is wealth inequality a problem : Is wealth inequality a problem? If so, what do you think might be some good ways to address it?
What is the delay for a packet to reach destination y : Assume the size of acknowledgment packet is 60b. What is the delay for a packet to reach destination Y (in micro-second)?
Develop a web-server that allows the database : Develop a web-server that allows the database to be queried using any web-browser.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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