Question: The application asks the user for an input file name. The contents of a sample input file with two jobs is shown below. One job

 The application asks the user for an input file name. The
contents of a sample input file with two jobs is shown below.
One job consists of a line with the job description followed by
a line with the number of job skills desired, n, followed by

The application asks the user for an input file name. The contents of a sample input file with two jobs is shown below. One job consists of a line with the job description followed by a line with the number of job skills desired, n, followed by n lines each listing a skill, followed by a salary followed by a company name - all on separate lines. Assume all string data will have less than 256 characters, there will never be more than 10 job skills, and there will not be extra white space in the input file. Also, if there is a job title on one line, the following lines of data for that job are guaranteed to exist. Job titles, skills, and company names may all be comprised of more than one word (use getline). UI Web Developer 8 Vue, Angular, or React D3 Javascript Java Python Node.js Git Relational database 83200 ITR Front-End Developer 8. Agile HTML5 css3 Javascript Angular NodeJS AJAX Git, Bitbucket, or Mercurial 0 CGI Group, Inc. After getting the file name from the user, the program reads the data from the file into an array of structures using a structure definition such as the one below. The program must be able to process at most data on 10 jobs, but the input file may have more or less entries in it. If the input file has more than 10 jobs in it, the program only reads the first 10 . If the input file has fewer than 10 jobs, the program partially fills the array of structures. const int MAX_SKILLS =10; const int MAX_STRING_LENGTH =256; struct Job \& char jobTitle[MAX_STRING_LENGTH] ; int numskills; char skills[MAX_SKILLS] [ MAX_STRING_LENGTH]; double salary; char company[MAX_STRING_LENGTH]; 1; After reading the job data into the array of structures, print the following menu for the user: 1 Search for job by title 2 Search for a job by skill 3 Quit Option> If the user chooses option 1, the program searches for job by title by If the user chooses option 2, the program searches for a job by skill by asking the user for the skill (case insensitive) and printing the job title, salary and company of all job postings that require that skill in a neatly formatted table as shown below in alphabetical order by job title. Words should be left aligned, numbers right aligned. Search for any skill that contains the search term. A basic outline for your program is below. It is a good, high-level algorithm for the main function where most bullet points are functions themselves. - Print hello message - Read the data from the file and place it in the array of structures - Sort the array of structures by title - do Print the user menu and get response If response is 1 , search by job title and print Otherwise if response is 2, search by skill and print Otherwise if not 1,2 or 3 print invalid - while response not 3 - Print goodbye message Error checking: - If the input file doesn't exist, print the error message: Input file does not exist. Please contact the administrator. (where is the filename). End the program with a goodbye message. - If the input file exists but is empty, print the error message: Input file is empty. Please contact the administrator. (where is the filename). End the program with a goodbye message. The easiest way to ask whether a C-string contains another C-string is to use the strstr function. This function is just another C-string function such as strcmp or strcpy. See https://cplusplus.com/reference/cstring/strstr/? kW=strstr for more information. If that's not enough for you to figure out how to use this function, then ask your instructor. The easiest way to ask whether a C++ string object contains another C++ string object is the string class' find function. See https://cplusplus.com/reference/string/string/find/ for more information. If that's not enough for you to figure out how to use the function, then as your instructor. Use constants where appropriate. Write and use at least three functions other than 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!