logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

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

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

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
(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

797 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

541 Answers

Hire Me
expert
Husnain SaeedComputer science

626 Answers

Hire Me
expert
Atharva PatilComputer science

505 Answers

Hire Me