Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSCI 15 Lab Assignment 4 Due 3/7/2018, 15 Points Structures A structure (struct) allows us to store a record that comprises multiple fields that may

CSCI 15 Lab Assignment 4

Due 3/7/2018, 15 Points

Structures

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.

The struct consists of an employee records fields:

Employee ID (string)

Last Name (string)

First Name (string)

Hours (float)

Pay Rate Per Hour (float)

Tax Rate (float)

Load the following records into the structure:

"De Bosse", "Ian D.", 34.5, 45.75, 0.05,

"Smithers III","Weylan K.S.", 40.1, 28.75, 0.04,

"Simpson", "Homer J.", 40, 23.44, 0.023,

"Haddington Smith", "Janet K.B.", 33.9, 35.75, 0.05,

"Jackson", "Sarah L.", 39.45, 17.88, 0.15,

"Kirk", "James Tiberius", 55.6, 89.65, 0.075,

"Griffin", "Peter R.", 25.6, 17.88, 0.04,

"Jones y Enrique", "Alias N.", 28.9, 37.88, 0.045

Display the struct records fields and the Gross, Taxes Withheld, and Net pay calculation

Gross Pay will be calculated from the fields Hours and Pay Rate (i.e. Hours * Pay Rate)

Taxes Withheld from Gross * Tax Rate field

Net Pay calculated from Gross Taxes Withheld

Allow user to find one employee based on index location (possibly some sort of menu interface?)

Allow user to change one or more fields of one particular record

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

More Books

Students also viewed these Databases questions