Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Structures (c++) only A structure (struct) allows us to store a record that comprises multiple fields that may be a different data type (i.e. several

image text in transcribedimage text in transcribedStructures (c++) only

A structure (struct) allows us to store a record that comprises multiple fields that may be a different data

type (i.e. several strings, some integers and floats). A structure can be stored in an array to allow easier

access to any of the records fields.

1. The struct consists of an employee records fields:

a. Employee ID (string text)

b. Last Name (string text)

c. First Name (string text)

d. Hours (float)

e. Pay Rate Per Hour (float)

f. Tax Rate (float)

2. Allow the application to read in data from an attach data file into a Structure with a maximum of

100 employees.

Data file is available on CANVAS

. Application will initially load data file at

start of program to initialize the structure (

NO, user will NOT type in the data neither will you

hard code the values in, do that and watch score drop!!)

3. User can display all of the records fields

a. Employee ID

b. Last Name

c. First Name

d. Hours

e. Pay Rate Per Hour

f. Tax Rate

4. Allow user to see the following:

a. Compute and display Gross Pay (Hours X Payrate)

b. Compute and display Taxes Withheld (Gross X Tax Rate)

c. Compute and display Net Pay (Gross Taxes Withheld)

5. Allow user to find one employee based on ID (index is just too easy) in the struct array (possibly

some sort of menu interface?)

6. Allow user to manually add additional employees subject to maximum number of employees

7. Allow the user to change one or more fields of an employee (find by ID)

8. Write the contents of the array back to the data file to update the data file when user exits

Example Output:

1 - Display All Employees

2 - Find One Particular Employee Based on ID (i.e. AF101, SG101, CV299)

3 - Find and Change Field Values

4 - Add a New Employee

5 - Quit

Enter an Option (1 - 5): 2

2

Find an Employee By Employee ID (i.e. AF101, BB002, JJ287, NG201) 16 Available Records:

AF101

Index Location 13 of 15

Employee ID: AF101

Hill, Jackie

Hours Worked: 38.40 @$ 28.40

Employee Tax Rate @ 15.00%

Gross Pay $1090.56

Less Taxes $54.53

Net Pay $1036.03

Hit Any Key to continue...

Find an Employee Employee ID (i.e. AF101, BB002, JJ287, NG201) 16 Available Records: AF101

Index Location 13 of 15

1 - Field 1 Employee ID: AF101

2 - Field 2 Last Name: Hill

3 - Field 3 First Name: Jackie

4 - Field 4 Hours Worked: 24.50

5 - Field 5 Pay Rate: 45.66

6 - Field 6 Tax Rate: 0.15

7 - QUIT

Enter 1 - 7:

Allow user to make more changes to the same employee WITHOUT returning to the main menu

(i.e. a submenu)

Change Another Field for Employee ID AF101 (Y or N)

A structure (struct) allows us to store a record that comprises multiple fields that may be a different data type (i.e. several strings, some integers and floats). A structure can be stored in an array to allow easier access to any of the records' fields 1. The struct consists of an employee record's fields a. Employee ID (string text) b. Last Name (string text) c. First Name (string text) d. Hours (float) e. Pay Rate Per Hour (float) f. Tax Rate (float) 2. Allow the application to read in data from an attach data file into a Structure with a maximum of 100 employees. Data file is available on CANVAS. Application will initially load data file at start of program to initialize the structure (NO, user will NOT type in the data neither will you hard code the values in, do that and watch score drop!!) 3. User can display all of the records' fields a. Employee ID b. Last Name c. First Name d. Hours e. Pay Rate Per Hour f. Tax Rate 4. Allow user to see the following a. Compute and display Gross Pay (Hours X Payrate) b. Compute and display Taxes Withheld (Gross X Tax Rate) c. Compute and display Net Pay (Gross - Taxes Withheld) 5. Allow user to find one employee based on ID (index is just too easy) in the struct array (possibly some sort of menu interface?) 6. Allow user to manually add additional employees subject to maximum number of employees 7. Allow the user to change one or more fields of an employee (find by ID) 8. Write the contents of the array back to the data file to update the data file when user exits Example Output: 1 - Display All Employees 2 - Find One Particular Employee Based on ID (i.e. AF101, SG101, CV299) 3 - Find and Change Field Values 4- Add a New Employee 5 - Quit Enter an Option (1 - 5): 2 Find an Employee By Employee ID (i.e. AF101, BB002, JJ287, NG201) 16 Available Records: AF101 Index Location 13 of 15 Employee ID: AF101 Hill, Jackie Hours Worked: 38.40 aS 28.40 Employee Tax Rate @ 15.00% Gross Pay Less Taxes Net Pay S1090.56 $54.53 $1036.03 Hit Any Key to continue... Find an Employee Employee ID (i.e. AF101, BB002, JJ287, NG201) 16 Available Records: AF101 Index Location 13 of 1:5 1 - Field 1 Emplovee ID: AF101 2 - Field 2 Last Name: Hill 3 - Field 3 First Name: Jackie 4 Field 4 Hours Worked: 24.50 5 - Field 5 Pay Rate: 45.66 6 - Field 6 Tax Rate: 0.15 7- QUIT Enter 1 - 7: Allow user to make more changes to the same employee WITHOUT returning to the main menu (i.e. a submenu) Change Another Field for Employee ID AF101 (Y or N): A structure (struct) allows us to store a record that comprises multiple fields that may be a different data type (i.e. several strings, some integers and floats). A structure can be stored in an array to allow easier access to any of the records' fields 1. The struct consists of an employee record's fields a. Employee ID (string text) b. Last Name (string text) c. First Name (string text) d. Hours (float) e. Pay Rate Per Hour (float) f. Tax Rate (float) 2. Allow the application to read in data from an attach data file into a Structure with a maximum of 100 employees. Data file is available on CANVAS. Application will initially load data file at start of program to initialize the structure (NO, user will NOT type in the data neither will you hard code the values in, do that and watch score drop!!) 3. User can display all of the records' fields a. Employee ID b. Last Name c. First Name d. Hours e. Pay Rate Per Hour f. Tax Rate 4. Allow user to see the following a. Compute and display Gross Pay (Hours X Payrate) b. Compute and display Taxes Withheld (Gross X Tax Rate) c. Compute and display Net Pay (Gross - Taxes Withheld) 5. Allow user to find one employee based on ID (index is just too easy) in the struct array (possibly some sort of menu interface?) 6. Allow user to manually add additional employees subject to maximum number of employees 7. Allow the user to change one or more fields of an employee (find by ID) 8. Write the contents of the array back to the data file to update the data file when user exits Example Output: 1 - Display All Employees 2 - Find One Particular Employee Based on ID (i.e. AF101, SG101, CV299) 3 - Find and Change Field Values 4- Add a New Employee 5 - Quit Enter an Option (1 - 5): 2 Find an Employee By Employee ID (i.e. AF101, BB002, JJ287, NG201) 16 Available Records: AF101 Index Location 13 of 15 Employee ID: AF101 Hill, Jackie Hours Worked: 38.40 aS 28.40 Employee Tax Rate @ 15.00% Gross Pay Less Taxes Net Pay S1090.56 $54.53 $1036.03 Hit Any Key to continue... Find an Employee Employee ID (i.e. AF101, BB002, JJ287, NG201) 16 Available Records: AF101 Index Location 13 of 1:5 1 - Field 1 Emplovee ID: AF101 2 - Field 2 Last Name: Hill 3 - Field 3 First Name: Jackie 4 Field 4 Hours Worked: 24.50 5 - Field 5 Pay Rate: 45.66 6 - Field 6 Tax Rate: 0.15 7- QUIT Enter 1 - 7: Allow user to make more changes to the same employee WITHOUT returning to the main menu (i.e. a submenu) Change Another Field for Employee ID AF101 (Y or N)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

More Books

Students also viewed these Databases questions

Question

Predict the Nel temperature for CrO.

Answered: 1 week ago

Question

Define induction and what are its objectives ?

Answered: 1 week ago

Question

Discuss the techniques of job analysis.

Answered: 1 week ago

Question

How do we do subnetting in IPv6?Explain with a suitable example.

Answered: 1 week ago

Question

Explain the guideline for job description.

Answered: 1 week ago

Question

What is job description ? State the uses of job description.

Answered: 1 week ago

Question

Describe how to train managers to coach employees. page 422

Answered: 1 week ago