You will get email Reply within few hours

Saturday 17 August 2013

3 pseudocodes

 1.
You are given a file that contains employee pay data. The file name is PayData.

The record layout for the file is:
DeptCode character
EmpName character
PayRate real
HrsWrkd real

You are also given an array that contains department codes and names. The array contains 10 elements of character data. Each element contains a 3 character department code followed by a dash and a 15 character department name.
Example: ABC-Department Name.
(Assume that for every department code in the table there is a matching department code in the array)

You are also given a tax withholding schedule.
Pay Amount Withholding %
0 – 200.00 10
200.01 - 350.00 14
350.01 - 500.00 18
500.00 and up 22

Write the pseudo code that will display each employees department name, employee name, gross pay and net pay.

Example
Accounting John Smith 1450.23 1256.59
Purchasing Freda Beckworth 987.42 796.14
Management Christine Bailey 2146.98 1954.55

Note: Gross pay is calculated by multiplying pay rate * hours worked
Net pay is calculated by multiplying gross pay by the withholding percentage and subtracting that amount from gross pay.


Example Input Example Output
“ADRVGYUIGJKY” “Error – no spaces in the string”



2: File Processing
You are given a file that contains sales data. The name of the file is Sales.

The record layout for the file is
Sales Person Id character
Sales Amount real

Example Input
111 $6385.22
444 $8916.22
111 $4882.16
222 $16402.00
333 $5110.00
111 $4600.00
333 $4999.99

Design a program that program that prompts the user to give you the Sales Person Id, then process the data in the file to get and display the total sales, average sales amount, largest sale and smallest sale for that sales person.

Example Output
Sales person XXX had totals sales of $999.99.
The average sales amount for sales person XXX was $999.99
The largest sale for sales person XXX was $999.99.
The smallest sale for sales person XXX was $999.99



3.
Design a program that uses the following parallel arrays:
Empid: An array of 7 intergers to hold employee identification numbers.
The Array should be initialized with the following numbers: 56588, 45201, 78951, 87775, 84512, 13028, 75804.
Hours: An array of 7 intergers to hold the numbers of hours worked by each employee.
Payrate: An array of 7 Reals to hold each employees hourly payrate( Real is variable type that can hold decimals like 6.01)
Wages: An array of seven Reals to hold each employees gross wage
The program should relate data in each array through the subscripts. For example, the number in element 0 of the hours array should be the the numbers of hours worked by the employee whose identification is stored in element 0 of the empid array. That same employees pay rate should be stored in element 0 of the payrate array.
The program should each employee number and ask the user to enter that employees hours and pay rate. It should the calculate the gross wages for that employee, which should be stored in the wages array. After the data has been entered for all the employees, the program should display each employees identification number and gross wages.

Need Solution https://gum.co/OOoZ