Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

only answer HW7 Q1, HW7 Q2, HW7 Q3 ***PLEASE DO NOT COPY FROM OTHER EXTERNAL SITES I ASKED THE QUESTION HERE BECAUSE THEY WERE WRONG,ITS

only answer HW7 Q1, HW7 Q2, HW7 Q3

***PLEASE DO NOT COPY FROM OTHER EXTERNAL SITES I ASKED THE QUESTION HERE BECAUSE THEY WERE WRONG,ITS EASY TO FIND BY A GOOGLE SEARCH SO PLEASE DO NOT COPY AND PASTE***

You will be completing a program that creates a list of employees. In HW7, the lowest linked list 'supervisors' does not come into the picture (it is ignored). It is a menu driven program where user is given following options:

a)Add anemployee's information (name and room number). In HW7, the new employeeneeds to be added to the head of the linked list. We do not ask user for supervisors to add in this function. So simply assign NULL to *supervisors member of the 'employee' node when a new employeeis added to the list in this function. (Note: *supervisors are used in HW8)

b)Display the employeelist. This function should print each employee's name and room number. It should not print supervisors of the employee. You MUST write a recursive function to implement this function. You may print the list forward or backward. See expected output for this function below.

c)Search anemployeein the list by name. It prints if the employee exists on the list or not. This function should return the 'employee' node if that employeeis found in the list, else return NULL. It is used as a helper function in executeAction() to check if the employeeexists in the list.

outputs:-

image text in transcribedimage text in transcribedimage text in transcribed
searchEmployee (15 points) CSE240 HW 7,8 Please enter your selection: HW7: a: add a new employee to the list d: display employee list (no supervisors) b: search for an employee on the list q: quit HW8: c: add a supervisor of a employee 1: display employees who report to a specific supervisor r: remove an employee q: quit b Please enter employee's name: David Luiz Employee name exists on the list!displayEmployeeList (15 points) CSE240 HW 7,8 Please enter your selection: HW7: a: add a new employee to the list d: display employee list (no supervisors) b: search for an employee on the list q: quit HW8 : c: add a supervisor of a employee 1: display employees who report to a specific supervisor r: remove an employee q: quit d Employee name: David Luiz Room number: 101 Employee name: William Borges Room number : 320 Employee name: Eden Hazard Room number: 101 (end of list)addEmployee (20 points) CSE240 HW 7,8 Please enter your selection: HW7 : a: add a new employee to the list d: display employee list (no supervisors) b: search for an employee on the list 9: quit HW8 : c: add a supervisor of a employee 1: display employees who report to a specific supervisor r: remove an employee q: quit a Please enter employee's name: Eden Hazard Please enter room number : 101 Employee successfully added to the list

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions