Question: Plan and code a menu-driven well modularized (functions) program utilizing an array. Read all tabs. 3/2/23 Revisions are in blue Modifying the previous lab. Store

Plan and code a menu-driven well modularized (functions) program utilizing an array. Read all tabs.

3/2/23 Revisions are in blue

Modifying the previous lab. Store text entries and their length in an array of structures. Add the following menu options to

Print the text entries and their length in a table format with headings; text entries should be left aligned and numerical entries should be right aligned; tip: use setw()

Display stats

the longest word and its length

the shortest word and its length

the count of the text entries stored

the total number of characters in all text entries

Print text entries in ascending order along with their length (use bubble sort)

Quit

Requirements/Specifications

One function = one job

Write one function to produce stats; go through the array of structs once only

Reading an Input File

Only go through the file once - do not read the file to count the number of entries, close it, and then read it again; someone can modify the file in the meantime

Output Formatting

output must be well-formatted, and easily understandable to those who have not seen the code

clearly label the output

Well document your code (comments); comments should be short and explain "why" and "what for"

Include test runs/ output as comment /* */ below all function definitions at the very bottom of the file with main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!