Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ This program is going to make use of structured data. You are to come up with two structures, one for an employee and one

C++

This program is going to make use of structured data.

You are to come up with two structures, one for an employee and one for a department.

The goal of this program is to read a text file that is comma separated.

The following fields will be in the text file, social security number, first name, last name, middile initial city, state, age, gender, department id, department name, building letter, building floor and department phone number.

You are to read these fields into a vector made of your structure. Use what you know to your advantage; we know that there are a set number of columns and we know that each column is separated by a comma.

It is crucial that this is dynamic.

Once the information is read in we will be able to perform some manipulation on the data.

We will display a menu that has the following options:

Display all employees,

display the name of the oldest employee,

display the building letter and floor for the computer science department,

display all department names are in building A,

find an employee and list their information and average age of employees who live in Arizona.

Once one of these options is selected the screen will clear and the result will show.

At this point the user will be able to enter 0 to display the menu options again or -999 to exit the program.

It is important to note that some of the menu options could show duplicate results, I do not want you to show duplicates (E.G. if more that one person works in a department in building A, we would list that department more than once. We do not want this.

You are not allowed to use any prebuilt functions to parse the data(E.G. istringstream) you must come up with your own algorithm for this.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

What is the cerebrum?

Answered: 1 week ago