Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

Students also viewed these Databases questions

Question

=+ Are they breakable for any reason?

Answered: 1 week ago

Question

=+When and under what circumstances are contracts renegotiated?

Answered: 1 week ago