Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

someone please help, previous codes did not compile. C++ Write a program that uses functions to read and process the data from a formatted file

image text in transcribed

someone please help, previous codes did not compile. C++

Write a program that uses functions to read and process the data from a formatted file The program should contain the following exact functions: 1. A Readconcepts function that reads a list of concepts/strings from the LIST.txt text file (one concept per line), stores them into an array of strings, and count how many concepts are in the list. The function should have two parameters (the array of concepts and a reference to the number of concepts in the array and should not return a value. Declare SIZE as a global constant (declared before all functions) initialized with a value large enough to hold all values from the file void ReadConcepts (string Arrayconcepts [SIZE, int& NumberConcepts) 2. An EnterLetter function that prompt the user to enter a letter from A to z or a to z, lets the user input a character, validates it (check if it is a valid letter), and if it is not, repeats the input of the character until it is a valid letter and returns it. The function should not have any parameters and should return the letter char EnterLetter () 3. A PrintConcepts function that prints all the concepts from the array. The function should receive the array of concepts and the number of concepts as parameters and should not return any values. PrintConcepts (string ArrayConceptstSI2B], int Nusberconcepts) intconceptawithoutSpaces function that prints all the concepts from the array that do not contain spaces. The function should receive the array of concepts and the number of concepts as parameters and should not return any values void PrintConceptsWithoutspaces (string ArrayconceptsISIZE), int Numberconcepts) 4. A Pr 5. A PrintconceptsLetter function that prints all the concepts from the array that contain the letter A (small or large caps). The function should receive the array of concepts and the number of concepts and the Letter as parameters and should not return any values vold PrintConceptsletter (char Letter, string Arrayconcepta (SI2E1, int Number Concepts) 6. Amain function that calls the Readconcepts function to read the concepts from the file and store thenm in ArrayConcepts and determine the Number concepta, calls the anterLetter function to enter a letter from the user, and then calls the Print Concepts, PrintconceptsLetter (for the letter returned by Enterbetter) for the Arr and and Pr int Conceptowithou: Spaces, s variables to print the concepts in various ways

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

Transactions On Large Scale Data And Knowledge Centered Systems Xxiv Special Issue On Database And Expert Systems Applications Lncs 9510

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Hendrik Decker ,Lenka Lhotska ,Sebastian Link

1st Edition

366249213X, 978-3662492130

More Books

Students also viewed these Databases questions

Question

define what is meant by the term human resource management

Answered: 1 week ago