In this project, you will create a database of employees by using a singly linked list.  while meeting the requirements described below.C++ Programming

Purpose

Review and reinforcement of singly linked list, struct, pointers, dynamic memory allocation, passing pointers to a function, returning a pointer by a function, dangling pointer, and memory deallocation, pointer initialization, and struct data type.

 

Project description

In this project, you will create a database of employees by using a singly linked list.  while meeting the requirements described below. Your program MUST NOT interact with the user to receive inputs so that the instructor and/or the teaching assistant can save big time in testing programs.

 

  1. Construction of a Database of Employees
  1. Employee

Employee is a struct data type that has the following attributes, or data members, or data fields

struct Employee {

string  firstName;

string  lastName;

int     SSN;

string  department;

Role    role;

double  salary;

};

 

The data type Role is defined as below.

enum Role {programmer, manager, director};

Define Employee.h and include the two data types above in the file. Role must be defined before Employee because Employee uses Role.

  1. Create a singly list of employees of size 10
  2. Set the salaries of employees by defining and calling setSalaries() in which each employee is given a salary with a random number ranging from 45000 to 65000
  3. Set the roles of employees by defining and setRoles() in which each employee is given a random role

 

  1. Display information
  1. Display on the console information of all employees using a tabular format
  2. Display the average salary of all the employees on the console
  3. Display the respective numbers of programmers, managers, and directors
  4. Display the information of programmers on the console using a tabular format
  5. Display the average salary of the programmers

 

  1. Memory management
  2. Delete the singly linked list after finishing all the work above

 

  1. Readability
    1. Apply indentations appropriately to make your program readable.

 

  1. Others
  2. No need of classes
  3. No need of makefile

Attachments:

Instructions Files

C++ Programming Experts

expert
Dinh Hong P.
C++ Programming

20 Answers

expert
Eric Bell
C++ Programming

88 Answers

View More Experts
Disclaimer

The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.

Get Free Quote!

256 Experts Online