1. A company wants to evaluate employee records in order to lay off some workers on the basis of service time (the most recently hired employees are laid off first). Only the employee ids are stored in stack. Write a program using stack and implement the following functions: Main program should ask the appropriate option from the user, until user selects an option for exiting the program. i) ii) iii) iv) Enter_company (emp_id)- the accepted employee id(integer) is pushed into stack. Exit_company (- The recently joined employee will be laid off from the company Show_employee ()- display all the employees working in the company. count()- displays the number of employees working in the company.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.5: Case Studies
Problem 3E
icon
Related questions
Question
1. A company wants to evaluate employee records in order to lay off some workers on the basis
of service time (the most recently hired employees are laid off first). Only the employee ids
are stored in stack. Write a program using stack and implement the following functions:
Main program should ask the appropriate option from the user, until user selects an option for
exiting the program.
Enter_company (emp_id)- the accepted employee id(integer) is pushed into stack.
Exit_company ()- The recently joined employee will be laid off from the company
Show employee ()- display all the employees working in the company.
count()- displays the number of employees working in the company.
i)
ii)
iii)
iv)
Transcribed Image Text:1. A company wants to evaluate employee records in order to lay off some workers on the basis of service time (the most recently hired employees are laid off first). Only the employee ids are stored in stack. Write a program using stack and implement the following functions: Main program should ask the appropriate option from the user, until user selects an option for exiting the program. Enter_company (emp_id)- the accepted employee id(integer) is pushed into stack. Exit_company ()- The recently joined employee will be laid off from the company Show employee ()- display all the employees working in the company. count()- displays the number of employees working in the company. i) ii) iii) iv)
Expert Solution
steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Linked List Representation
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning