Write loop which processes pay for all workers in array

Assignment Help Programming Languages
Reference no: EM1368425

You will be writing a program that is part of a payroll system for a very small store. Given the following description, write a program that does the tasks listed. Assume that all workers are paid by the hour.

1.Define an enumerated type job_t to represent four different titles: manager, stocker, clerk, and bagger.

2.Define a structured type worker_t to represent the name, title, payrate , and hours for any worker. The title should be of type job_t defined previously.

3.In main()

Declare an array object to hold the data for 10 workers.
Print program titles and report headings, then call the input function described next to fill in the data array. Write a loop that processes pay for all the workers in the array. Within the loop, use hours and the worker's pay rate to calculate the employee's weekly pay. Print the worker's name and pay, and keep sums of the total wages earned by the employees in each of the four categories.
At the end of the loop, print the total pay for each category of workers and the grand total for all workers.

4.In the input function, write a loop that read the data for all 10 workers. An array to hold these data should be a parameter to the function. Within this loop, read a worker's name, pay rate, and hours worked and store them in the current slot of the array. Then present a menu of job types and store the response in the record.

Reference no: EM1368425

Questions Cloud

Computing profit maximization and cost functions : Assume there are 3-firms with the same individual demand function. This function is Q = 1,000 - 40P. Assume each firm has a different cost function.
Write design objective of memory hierarchy : Write a design objective of memory hierarchy in parallel processing system and multiprogrammed uniprocessor system.
Explain from a brand equity perspective : Explain From a brand equity perspective consumers must find the price of a brand appropriate and reasonable. Identify a product that you have used
Determine marginal propensity : A open economy has a marginal propensity to import equal to .2 and a marginal propensity to consume equal to .7. Determine propensity to save of this economy?
Write loop which processes pay for all workers in array : Print program titles and report headings, then call input function described next to fill in data array. Write loop which processes pay for all workers in array.
Explain which retained and perfected a security : Explain Appliance Store acquired inventory on credit from TV Manufacturer and Explain which retained and perfected a security interest in the TV sets until they were paid for
Question on price discrimination : SAR Publisher is a monopolist in publishing a textbook on Hong Kong economy. Besides the Hong Kong market, SAR Publisher also sells this textbook in United State.
Module program to compare state and county sales tax : Create a module program which will ask the user to enter amount of a purchase. Program must then compare state and county sales tax.
Explain if bree signs her name followed by the word : Explain If Bree signs her name followed by the word agent on the check without identifying Cleo

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd