Terminalcoffee discussion
Help! I Need Help!
>
Pseudocode help, anyone?
date
newest »

Problem #1
a. Design the logic for an application for a company that wants a report containing a breakdown of
payroll by department. Input includes each employee’s last name, first name, department number,
hourly salary, and number of hours worked. The output is a list of the seven departments in the
company (numbered 1 through 7) and the total gross payroll (rate times hours) for each
department.
b. Modify a so that the report lists department names a well as numbers. The department names
are:
Dept. Num. Department Name
1 Personnel
2 Marketing
3 Manufacturing
4 Computer Services
5 Sales
6 Accounting
7 Shipping
c. Modify the report created in exercise b so it prints a line of information for each employee before
printing the department summary at the end of the report. Each detail line must contain the
employee’s name, department number, department name, hourly wage, hours worked, gross pay,
and withholding tax.
Withholding taxes are based on the following percentages of gross pay:
Weekly Gross Pay ($) Withholding (%)
0.00 – 200.00 10
200.01 – 350.00 14
350.01 – 500.00 18
500.01 – up 22
Program #2
a. Daily Life Magazine wants an analysis of the demographic characteristics of its readers. The
Marketing Department has collected reader survey records containing the age, gender, marital
status, and annual income of readers. Design an application that accepts reader data and
produces a count of readers by age groups as follows: under 20, 20-29, 30-39, 40-49, and 50+
b. Create the logic for a program that would produce a count of readers by gender within age group—
that is, under 20 females, under 20 males, etc.
c. Create the logic for a program that would produce a count of readers by income groups as follows:
under $20,000, $20,000-$29,999, $30,000-$49,999, $50,000-$69,999, and $70,000 and up.
a. Design the logic for an application for a company that wants a report containing a breakdown of
payroll by department. Input includes each employee’s last name, first name, department number,
hourly salary, and number of hours worked. The output is a list of the seven departments in the
company (numbered 1 through 7) and the total gross payroll (rate times hours) for each
department.
b. Modify a so that the report lists department names a well as numbers. The department names
are:
Dept. Num. Department Name
1 Personnel
2 Marketing
3 Manufacturing
4 Computer Services
5 Sales
6 Accounting
7 Shipping
c. Modify the report created in exercise b so it prints a line of information for each employee before
printing the department summary at the end of the report. Each detail line must contain the
employee’s name, department number, department name, hourly wage, hours worked, gross pay,
and withholding tax.
Withholding taxes are based on the following percentages of gross pay:
Weekly Gross Pay ($) Withholding (%)
0.00 – 200.00 10
200.01 – 350.00 14
350.01 – 500.00 18
500.01 – up 22
Program #2
a. Daily Life Magazine wants an analysis of the demographic characteristics of its readers. The
Marketing Department has collected reader survey records containing the age, gender, marital
status, and annual income of readers. Design an application that accepts reader data and
produces a count of readers by age groups as follows: under 20, 20-29, 30-39, 40-49, and 50+
b. Create the logic for a program that would produce a count of readers by gender within age group—
that is, under 20 females, under 20 males, etc.
c. Create the logic for a program that would produce a count of readers by income groups as follows:
under $20,000, $20,000-$29,999, $30,000-$49,999, $50,000-$69,999, and $70,000 and up.


I'm a database dood, but I gotta take this class for my Master's. Much to my chagrin.

For example, if you already have the data, then just pull the results you need, one at a time, and add them to your report.
"A" would look something like:
SUM all (RATE*HOURS) WHERE DEPT_NUM=1
"B" is a straightforward modification of the report.
"C" is a matter of printing the data line-by-line as you collect it with your query.
The hard part for me would be the report layout. That's a lot of information to try to include on one page.


"A" is the number of records found on a query by age.
SELECT COUNT as total_age FROM 'readers' WHERE age>20 AND age<30
Is that the kind of thing you're needing, or am I way off track?
Yes, it's a start. It's the whole range thing that sort of has me flummoxed, but counts have to initialized to zero so they can be added to during the course of the program.
Thanks, Phil! I'll take it from here.
Thanks, Phil! I'll take it from here.

Huge difference. Pseudocode doesn't have anywhere near the precision of production code. It's basically writing down the algorithm in words that approximate code.
It has been a long time since I've coded anything. I used to be hot shit -- now I'm just an old cow pie. :(
::cries about obsolescence::
Anyone know anything about arrays and pseudocode?
Have at me with the sarcasm and abuse, but I really do have a few questions. Seriously...