Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

array of seven long integers to hold employee identification numbers. The array 8777541 Problem #2 (50 points) Write a program that uses the following arrays:

image text in transcribed
array of seven long integers to hold employee identification numbers. The array 8777541 Problem #2 (50 points) Write a program that uses the following arrays: empld: an should be initialized with the following numbers 7895122 4520125 5658845 8451277 7580489 1302850 hours: an array of seven integers to hold the number of hours worked by each employee payRate: an array of seven doubles to hold each employee's hourly pay rate grossPay: an array of seven doubles to hold each employee's gross wages fedTax: an array of seven doubles to hold each employee's federal tax state Tax: an array of seven doubles to hold each employee's state tax cityTax: an array of seven doubles to hold each employee's federal tax schoolTax: an array of seven doubles to hold each employee's school tax ficaTax: an array of seven doubles to hold each employee's FICA tax netPay: an array of seven doubles to hold each employee's federal tax . Your program should relate the data in each array through the subscripts. For example, the number in be the number of hours worked by the employee whose identification number is stored in element 0 of the empld array. The same employee's pay rate should be stored in element O of the payRate array. Your program should display each employee number and ask the user to enter that employee's hours and pay rate. It should then calculate the gross wages for that employee (hours times pay rate) and store them in the wages array. Use the following tax rates in your program: Federal 10%, State = 5.75%, City # 2.75%, School-196, FICA-6.2% After the data has been entered for all the employees, your program should display each employee's identification number, gross wages, payroll deductions, and net pay. (hint this is a parallel array problem and is simi ar to Program 7-13 on page 403 of your textbook) Input validation: Your program should not accept negative numbers for hours and numbers less than 15.00 for pay rate

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2022 Grenoble France September 19 23 2022 Proceedings Part 4 Lnai 13716

Authors: Massih-Reza Amini ,Stephane Canu ,Asja Fischer ,Tias Guns ,Petra Kralj Novak ,Grigorios Tsoumakas

1st Edition

3031264118, 978-3031264115

More Books

Students also viewed these Databases questions