Write a defining diagram (IOP chart) and a program that uses a set of parallel a
ID: 3825746 • Letter: W
Question
Write a defining diagram (IOP chart) and a program that uses a set of parallel arrays, one for employee names and one to store each of those employees’ job titles. The program will use header logic format that requests input from the user as follows: First the user will input the number of employees, followed by that number of employee names and their job titles. Use a module to build an array to store the employee name and then another module to go through the names and build an array and store job titles. The use another module that queries the user for a job title and displays all employee names with that job title.
INPUT
PROCESSING
OUTPUT
Emp name
Prompt for number of employees, number of employee names, job titles
Emp name
Emp Job Title
Store employee names and job title in arrays
Emp Job Title
# of Emp
Displays employee names with job title
Compare job title
Start
DECLARE STRING [] empName
DECLARE STRING [] jobTitle
DECLARE INT numberOfEmp
This is all I got & I’m not sure what to do next. Please no JAVA! Just basic pseudocode.
INPUT
PROCESSING
OUTPUT
Emp name
Prompt for number of employees, number of employee names, job titles
Emp name
Emp Job Title
Store employee names and job title in arrays
Emp Job Title
# of Emp
Displays employee names with job title
Compare job title
Explanation / Answer
Hi,
Please see below the pseudocode.
1.DECLARE STRING [] empName
2.DECLARE STRING [] jobTitle
3.DECLARE INT numberOfEmp
4.Prompt the user to enter the no of Employees
5.Store this value to numberOfEmp
6.Prompt the user to enter name and job title with a space in between of all employees
7.call populateEmployeeName module
8. call searchEmployee Module and set the result to title
9. Display the title
populateEmployeeName Module
1.while(counter<numberOfEmp)
Read the entries to empName array
2.call populateEmployeeTitle module
populateEmployeeTitle Module
1.while(counter<numberOfEmp)
Split each array element with space
set name = splitResult[0]
set title = splitresult[1]
set empName[counter] = name
set jobTitle[counter] = job
searchEmployee module
1. Prompt the user to enter the name to search
2. while(counter<numberOfEmp)
Check each empName arrael element
if a macth found, get the jobTitle[counter]and return
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.