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

  Ways to ensure that website is easy to navigate

A good practice would be to spread the content out among several pages. What are some ways to ensure that your website is easy to navigate?

  Write program to prints the question

Write a program that prints the question"do you want to continue?" and reads a user input. if the user input is"y", "yes", "ok", "sure", or "why not?".

  Explaining class with no constructors

How many constructors can a class have? Can you have a class with no constructors? If a class has more than one constructor, which of them gets called?

  Write a program that will use the four sorting algorithm

Write a program that will use the four sorts (Selection sort, Heap Sort, Quicksort and Merge Sort). Each of the four sorts should be TIMED on three different lists of integers.

  Draw diagram shows occupancy of buffer as function of time

A transmitter with rate R bps serves the buffer by sending the bits whenever available. Draw a diagram that shows the occupancy of the buffer as a function of time, for different ranges of values for R.

  Design a math sorting game

Using Visual Studio 2010, design a math sorting game. A random number between 1 and 99 will be generated and displayed to the user. User will quickly have to divide that number by 3, and come up with remainder.

  Object-oriented analysis and design

Object-Oriented Analysis and Design,  PART B-object-oriented design involves the steps 13-18:

  Communicate with a pc using the rs232c serial protocol

In this assignment we will use the UART0 peripheral to communicate with a PC using the RS232C serial protocol.

  Design considerations to comply with ada

Browsing devices that assist people with disabilities, such as an aural browser, are especially dependent on the best use of CSS styles. What design considerations should you be aware to comply with ADA?

  Explaining tags used for effective page layout

Page layout is one of the most time consuming tasks for a web designer. What are some of the tags used for effective page layout and how do they work?

  Creating loop to find number of items bought based on price

Make a block using a loop that will find the number of items that can be bought based on the price of the item and the total amount available to spend.

  Display policy data after revisions have made

The day is not correct for the month (that is, between 1 and 31 for January, 1 and 29 for February, and so on), then set the month, day, and year to 0. Display the policy data after any revisions have been made.

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