JJ@cup.portal.com (04/25/88)
Hello, Lets have a little contest here, I'm going to give you all a problem, and lets see who can write the FORTRAN program to solve it first. C'mon this'll be fun!!! . Here we go.... . You are in charge of payroll for the ACME Vending Co., Inc.. It is your job to write a program which will print a payroll report for the 10 employees of the company. To prepare the payroll report, you must READ the identification number, hours worked, hourly rate, and tax rate, for each employee. After entering this information for all employees, the screen should be cleared before the OUTPUT is presented. All of this information is to be printed along with the gross pay, regular pay, overtime pay, deductions for taxes, and net pay. The last line of OUTPUT should be: "The total gross payroll for the week is _________". Overtime is considered anything over 40 hours per week. Overtime pay is worth 1.55 times the regular hourly rate. Output should look like this: NAME ID GROSS REG OVT DED NET PAY ==== == ===== === === === ======= The spacing between headings shown above is not significant. Here is some samples of the data that will be used to test the program: NAME ID HRS RATE TAX CARR 7056 56.8 6.71 .3 ELS 9111 63.2 7.3 .17 CAMPBELL 7958 40.4 7.5 .22 THERE WILL ALSO BE 7 MORE! So, there you have it... The first person who sends the CORRECT program listing WINS. You can use any version of FORTRAN you like, but keep it BASIC. There will be a panel of 4 people to judge the listings, and a prize WILL be awarded! So... G O T O I T !!!!! +----------------------------------------------------------------------+ |Address: ucbvax!sun!cup.portal.com!jj / "God loves YOU, just the | | _ _ Representing | way you are, he really, | | | | | | __ | really does! Bye Bye for | | | | | | | | today." -- Tammy Faye Bakker | | | | | | |-- NTERPRISES | | |__ | | __ | | |___ | BRING BAKKERS CLUB | |\ \_| | \ \_| | | PO BOX 3131 | | \___/ O \___/ O PO Box 5631 | Tega Cay, SC 29715 | | Lincoln, NE 68505 \ | +----------------------------------------------------------------------+
cjl@ecsvax.UUCP (Charles Lord) (04/26/88)
Sounds to me like somebody wants the net to do his CS100 homework for him...
levy@ttrdc.UUCP (Daniel R. Levy) (04/27/88)
In article <4984@ecsvax.UUCP>, cjl@ecsvax.UUCP (Charles Lord) writes: > Sounds to me like somebody wants the net to do his CS100 > homework for him... Yup, remember the tale about Tom Sawyer and the fence he was supposed to whitewash...? :-) -- |------------Dan Levy------------| Path: ihnp4,<most AT&T machines>!ttrdc!levy | AT&T | Weinberg's Principle: An expert is a | Data Systems Group | person who avoids the small errors while |--------Skokie, Illinois--------| sweeping on to the grand fallacy.
sharp@usceast.UUCP (Harry Sharp) (04/28/88)
In article <4766@cup.portal.com> JJ@cup.portal.com writes: >You are in charge of payroll for the ACME Vending Co., Inc.. >It is your job to write a program which will print a payroll >report for the 10 employees of the company. To prepare the >payroll report, you must READ the identification number, hours >worked, hourly rate, and tax rate, for each employee. After >entering this information for all employees, the screen should >be cleared before the OUTPUT is presented. All of this >information is to be printed along with the gross pay, regular >pay, overtime pay, deductions for taxes, and net pay. The last >line of OUTPUT should be: > >"The total gross payroll for the week is _________". > >Overtime is considered anything over 40 hours per week. >Overtime pay is worth 1.55 times the regular hourly rate. > >Output should look like this: > >NAME ID GROSS REG OVT DED NET PAY >==== == ===== === === === ======= Come on guys! This is obviously a problem NOT suited for FORTRAN. Character manipulation in FORTRAN has been and will be a headache and a less than perfect endeavor. The program is a payroll program (read: business application). For this problem you need a language well suited to report generation and file handling. FORTRAN ain't it. The language for this problem is (hold on all you scientific types) COBOL and yes I hear all those groans. ;-) This is a prime example of what I argue against every day here in the CS department. Languages should be chosen to best approach the problem. You wouldn't do Monte Carlo simulation in COBOL, why do payroll in FORTRAN? Harry Sharp [=============================================================================] Harry Sharp USMail : Dept of Computer SciencE, USC, Columbia, SC 29208 BITNET : T170126 @ UNIVSCVM ncr-sd!ncrcae-\ E-mail : gatech!hubcap->!usceast!sharp (?) ihnp4--/ [=============================================================================]
eugene@pioneer.arpa (Eugene N. Miya) (04/28/88)
> COBOL
Sorry this is a poor example on the use of COBOL. There are
better languages for report generation (this is not character manipulation).
I've written enough DATA DIVISIONs to know (More than 1 is enough).
Perhaps try RPG II, or better yet a combination of of AWK, and shell scripts.
I don't intend to help some's homework, but do consider more than the source
(Fortran) program to do this work.
If I could change one bit of my past by travelling back in time, I would
convince my younger self that the one COBOL class I was about to take was a
mistake. Better to have taken a Religious Studies Class to get the GE
requirements out of the way.
Follow-ups to comp.lang.cobol. ;-) And Flames to /dev/null.
Another gross generalization from
--eugene miya, NASA Ames Research Center, eugene@ames-aurora.ARPA
soon to be aurora.arc.nasa.gov
at the Rock of Ages Home for Retired Hackers:
"Mailers?! HA!", "If my mail does not reach you, please accept my apology."
{uunet,hplabs,hao,ihnp4,decwrl,allegra,tektronix}!ames!aurora!eugene
"Send mail, avoid follow-ups. If enough, I'll summarize."