# DYNAMIC-LINKED-LISTS-WITH-POINTERS-computer-science-homework-help – Nursingresearchtutors | Assignment Collections | assignmentcollections.com

DYNAMIC-LINKED-LISTS-WITH-POINTERS-computer-science-homework-help – Nursingresearchtutors | Assignment Collections | assignmentcollections.com.

Write a C program that will calculate the gross pay of a set of employees.

## WHAT YOU NEED TO DO:

The program should prompt the user to enter the number of hours each employee worked.

## Overtime pay factor

The program determines the overtime hours (anything over 40 hours), the gross pay and then outputs a table in the following format. Column alignment, leading zeros in Clock#, and zero suppression in float fields is important. Use 1.5 as the overtime pay factor.

You should implement this program using the following structure to store the information for each employee.

struct employee
{
Ã‚  Ã‚  char first_name [10];
Ã‚  Ã‚  char last_name [10];
Ã‚  Ã‚  int id_number; Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚ Ã‚ /* use can use long int if you wish */
Ã‚  Ã‚  float wage;
Ã‚  Ã‚  float hours;
Ã‚  Ã‚  float overtime;
Ã‚  Ã‚  float gross;

Ã‚  Ã‚ Ã‚ struct employee *next;
};

Create a linked list of structures using the following data:

Connie Cobol 98401 10.60
Mary Apl 526488 9.75
Frank Fortran 765349 10.50
Anton Pascal 127615 8.35

Unlike previous assignment, you need to prompt the user for all of the above information, … and you still need to prompt for the hours worked for each employee.

Hint: Use one or two scanf statements to read in the first and last names with the %s format.

## Data

Get the data above from the terminal, and for each one:

• get dynamic memory, using malloc, for an employee node
• put the employee data in the dynamic memory node
• link the nodes with pointers in the above order

After the list pointers are in place you must get at the second and later instances of the structure by going from the first structure down the chain of list pointers.

Then, for each employee, read in the hours worked from the terminal. Do all appropriate computations, and write out the table.

Use the template and dynamically allocate linked list nodes as needed.Ã‚  Similar to the previous assignment:

a) Add a Total row at the end to sum up the hours, overtime, and gross columns
b) Add an Average row to print out the average of the hours, overtime, and gross columns.

Your code should work for any number of employees, and that is how the template is designed.

Tip: Use left justification to line up character array name values … for example: %-10.10s or %-10s

Remember: Please use the template below!

## >http

http://ideone.com/8p8Af7

##### Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!Use Discount Code “Newclient” for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational
0 replies