Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CODE C++ CS280 Programming Assignment 1 Spring 2018 In this assignment we will be reading from a file, or from standard input, and performing some

CODE C++image text in transcribedimage text in transcribedimage text in transcribed

CS280 Programming Assignment 1 Spring 2018 In this assignment we will be reading from a file, or from standard input, and performing some analysis based on options given to the program. For this assignment, the following definitions apply: Whitespace" is a sequence of one or more horizontal or vertical non-printed spaces. A sequence of spaces, tabs, newlines, form feeds, etc are "whitespace". A character is whitespace if isspace) from cctype is true A "word" is a sequence of one or more non-whitespace characters, separated by whitespace A "goodword" is a word that has only letters and numbers in it A "realword" is a word that has only letters in it A "capword" is a word that begins with an upper case letter An "acronym" is a word that contains only uppercase letters . . Note that by these definitions 1. hello is a word, a goodword, and a realword 2. Hello is a word, a goodword, a realword, and a capword 3. Won't is a word and a capword 4. Art3mis is a word, a goodword, and a capword 5. SCUBA is a word, a goodword, a realword, a capword, and an acronym 6. C3PO is a word, a goodword and a capword 7. higgledy-piggledy is a word The assignment is to write a program that copies from input to output. Based on command line arguments, the program may modify the input before generating output, and may gather and print statistics The command line arguments are zero or more "flags" followed by an optional filename. A "flag is a command line argument that begins with a hyphen. If a filename is provided, it must be the last command line argument, and can not begin with a hyphen. If a filename is provided, then the file with that name provides the input to the program. If a filename is not provided, then the program should read the standard input. All output must be sent to the standard output. The program should count the number of characters, lines, words, goodwords, realwords, capwords and acronyms in the input and the output The program may, based on command line flags, print out these counters when it has completed the processing of input files CS280 Programming Assignment 1 Spring 2018 In this assignment we will be reading from a file, or from standard input, and performing some analysis based on options given to the program. For this assignment, the following definitions apply: Whitespace" is a sequence of one or more horizontal or vertical non-printed spaces. A sequence of spaces, tabs, newlines, form feeds, etc are "whitespace". A character is whitespace if isspace) from cctype is true A "word" is a sequence of one or more non-whitespace characters, separated by whitespace A "goodword" is a word that has only letters and numbers in it A "realword" is a word that has only letters in it A "capword" is a word that begins with an upper case letter An "acronym" is a word that contains only uppercase letters . . Note that by these definitions 1. hello is a word, a goodword, and a realword 2. Hello is a word, a goodword, a realword, and a capword 3. Won't is a word and a capword 4. Art3mis is a word, a goodword, and a capword 5. SCUBA is a word, a goodword, a realword, a capword, and an acronym 6. C3PO is a word, a goodword and a capword 7. higgledy-piggledy is a word The assignment is to write a program that copies from input to output. Based on command line arguments, the program may modify the input before generating output, and may gather and print statistics The command line arguments are zero or more "flags" followed by an optional filename. A "flag is a command line argument that begins with a hyphen. If a filename is provided, it must be the last command line argument, and can not begin with a hyphen. If a filename is provided, then the file with that name provides the input to the program. If a filename is not provided, then the program should read the standard input. All output must be sent to the standard output. The program should count the number of characters, lines, words, goodwords, realwords, capwords and acronyms in the input and the output The program may, based on command line flags, print out these counters when it has completed the processing of input files

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

4. When is it appropriate to show grace toward others?

Answered: 1 week ago