Question
Goal Develop a new program that simulates the hiring and processing of new employees for your company. The queue should be a First In First
Goal
Develop a new program that simulates the hiring and processing of new employees for your company. The queue should be a First In First Out (FIFO) based queue.
Input
Data about current employees should be on the file "Employee.txt".
Each employee should have the following attributes: Employee_Number Integer Employee_Last_Name String Employee_First_Name String Employee_Years_of_Service Integer
3 employees must be loaded from the Employee.txt file on program start up.
Functionality Command Processing
ADD NEW EMPLOYEE Allows the user to "Add" add a new employee to the queue
REMOVE EMPLOYEE Allows the user to "Remove" an employee from the queue
SIZE Returns the number of Employees in the queue
QUIT Stops processing Output All output should be on the console.
Data Structures
This program should implement a queue as a linked structure (5.4).
Deliverables
Neat and well commented program
Complete zipped Visual Studio Project
Use the following classes to begin:
Employee.h
//employee class file
#ifndef EMPLOYEE #define EMPLOYEE
#include
using namespace std;
class Employee { private: int employeeNumber; string lastName; string firstName; int yearsOfService;
public:
//Constructors Employee(); void employeeInfo(int, string, string, int);
//getters const int getEmployeeNumber(); const string getFirstName(); const string getLastName(); const int getYearsOfService();
//setters void setEmployeeNumber(int); void setFirstName(string); void setLastName(string); void setYearsOfService(int);
void newEmployee(); const void print(); };
#endif
Employee.cpp
//employee Class
#include"Employee.h"
//Constructor Employee::Employee() { employeeNumber = 0; }
void Employee::employeeInfo(int idNumber, string last, string first, int years) { employeeNumber = idNumber; lastName = last; firstName = first; yearsOfService = years; }
//setters
void Employee::setEmployeeNumber(int idNumber) { employeeNumber = idNumber; }
void Employee::setFirstName(string first) { firstName = first; }
void Employee::setLastName(string last) { lastName = last; }
void Employee::setYearsOfService(int years) { yearsOfService = years; }
// getters const int Employee::getEmployeeNumber() { return employeeNumber; }
const string Employee::getLastName() { return lastName; }
const string Employee::getFirstName() { return firstName; }
const int Employee::getYearsOfService() { return yearsOfService; }
void Employee::newEmployee() { string userInput; int value;
cout << "Employee Number "; cin >> value; while (value <= 0) { cout << "Employee Number "; cin >> value; } employeeNumber = value;
cout << "Last Name: "; cin >> userInput; lastName = userInput;
cout << " First Name: "; cin >> userInput; firstName = userInput;
cout << "Years of Service: "; cin >> value; yearsOfService = value;
}
const void Employee::print() {
cout << "Employee Number: "; cout << employeeNumber << endl; cout << "Name: "; cout << firstName << " " << lastName << endl; cout << "Years of Service: " << yearsOfService << endl << endl; }
Any help would be greatly appreciated! The current question posted on this site does not provide any functioning code to learn from, so please be original so I may further understand queue implementation. Thanks.
Step 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