Project 3 (SUBMISSIONS ADDED! (3)) In this project, you will design a simple word processor: Your word processor will take a line of input and align it left, right, or centered. It will also report word count and average word length. To have an idea of what the end result will be, an example execution is shown below. The first four lines are prompts for input, the other lines are outputs of the program: Input: CS Column width: 4 Alignment: center Autocorrect: no CS Words: 1 Avg word length: 2.000000 All input will be less than 1000 characters. You can also assume all inputs are valid, except for column width, which may be an invalid value that you will detect More details are discussed in the following sections. Alignment The text to align is entered via the Input: prompt. Then the user will select a column width with the Column width: prompt and a text alignment via the Alignment: prompt The user will enter a column width, and you will align the text within this column. For example, if the entered text was OS and the column width was 6. you would center it as Note the six hyphens output to show each column CS As seen above, each column number is shown, followed by a separating line of dashes, and then the final output. In the above example, the text is padded with two spaces on each side to center it. The two spaces on the right are not needed and should not be output. In the event that you find yourself with an odd number of spaces to divide, place the extra space on the left. For example, if the column width was 7: CS Examples of the three alignments given a column spacing of 6 are shown below: Left CS Right
Project 3 (SUBMISSIONS ADDED! (3)) In this project, you will design a simple word processor: Your word processor will take a line of input and align it left, right, or centered. It will also report word count and average word length. To have an idea of what the end result will be, an example execution is shown below. The first four lines are prompts for input, the other lines are outputs of the program: Input: CS Column width: 4 Alignment: center Autocorrect: no CS Words: 1 Avg word length: 2.000000 All input will be less than 1000 characters. You can also assume all inputs are valid, except for column width, which may be an invalid value that you will detect More details are discussed in the following sections. Alignment The text to align is entered via the Input: prompt. Then the user will select a column width with the Column width: prompt and a text alignment via the Alignment: prompt The user will enter a column width, and you will align the text within this column. For example, if the entered text was OS and the column width was 6. you would center it as Note the six hyphens output to show each column CS As seen above, each column number is shown, followed by a separating line of dashes, and then the final output. In the above example, the text is padded with two spaces on each side to center it. The two spaces on the right are not needed and should not be output. In the event that you find yourself with an odd number of spaces to divide, place the extra space on the left. For example, if the column width was 7: CS Examples of the three alignments given a column spacing of 6 are shown below: Left CS Right
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
USING C, NOT C++ PLEASE
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education