Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Help ASSIGNMENT 3 Write a program that uses functions to read and process the data from a formatted file. The program should contain the
C++ Help
ASSIGNMENT 3 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], ?nts NumberConcepts) 2. An Enterletter function that prompt the user to enter a letter from A to z ora to , 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 void Print Concepts (string ArrayConcepta(SIZE, Int NumberConcepts) 4. A PrintConcept.swithoutSpaces 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 d Printconceptawithout Spaces (string Arrayconcepts[S12E, int Numberco A Printconceptaletter 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 5. old t Conceptsletter (char Lerterstr ing IZE umbe 6. A main function that calls the sead function to read the concepts from the file and store therm tter function to enter a letter and and in Arra from the user, and then calls the PEint and determine the Numbez , calls the Enta oncoptaLe (for the letter returned by Enterletter) for the umbe variables to print the concepts in various ways ASSIGNMENT 3 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], ?nts NumberConcepts) 2. An Enterletter function that prompt the user to enter a letter from A to z ora to , 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 void Print Concepts (string ArrayConcepta(SIZE, Int NumberConcepts) 4. A PrintConcept.swithoutSpaces 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 d Printconceptawithout Spaces (string Arrayconcepts[S12E, int Numberco A Printconceptaletter 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 5. old t Conceptsletter (char Lerterstr ing IZE umbe 6. A main function that calls the sead function to read the concepts from the file and store therm tter function to enter a letter and and in Arra from the user, and then calls the PEint and determine the Numbez , calls the Enta oncoptaLe (for the letter returned by Enterletter) for the umbe variables to print the concepts in various waysStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started