pascal program assignment help 
Author Message
 pascal program assignment help

JB> hello you lovely clever cobol and Pascal programmers,

How did you know I was a clever COBOL/Pascal programmer ;)

JB> can you help me with my assignment. i've attached problem and my
JB> solution so far. unfortunately with all the changing and workings,
JB> the pool as become more muddier than clearer.

I. Posting binaries to a text newsgroup is considered poor etiquette.
    A. Posting it in a Word 97 format is even worse because a lot of
       people either don't use MS Word or have an older version unable
       to read your file format.
    B. Posting it in text would far more preferable (and easier).
    C. Just give a synopsis of what you need help with - not the
       entire project.

Problems I see so far: 1) using unassigned variables (i.e. A and B);
2) Not enough storage space (i.e. EmployeeName has enough room to
store 1 character); 3) Assigning invalid values to variables (i.e.
A and B can only be set to true|false not 10 or 14); 4) Your
if/then/else logic is going to deeply nested. Consider rethinking
your steps and possibly using "procedures" if you're allowed to

I've done you the favor of indenting and inserting lines to make it
a bit more readable. What you have so far looks like a decent start
but also points out you're not too sure where you're going. Have you
sat down with pencil & paper and thoroughly mapped out what you want
to do?

Program ShiftBonus (Input, Output) ;
(*
  author john bell
  date   10/10/98
  modifications              
*)

(* weekly employee shift bonus*)
const
  ordhours = 6 ;

var
  HoursPerShift, BonusHourRate, ClockNumber, ShiftsPerWeek,
  AShift, BShift, Sum, WeekHoursAttend : integer;

  EmployeeName : char ;

  A, B, ErrorFlag : boolean;

  WeekAttendBonus, WeekAddHoursBonus : real;

begin
   writeln ('shift bonus for employees') ;
   writeln ('date') ;
   writeln ('week number') ;
   write   ('input employee clock number, 9999 to be used as terminator') ;
   readln  (clocknumber) ;

   while clocknumber <> 9999 do
      begin
         errorflag := false ;

         if (clocknumber <0) or (clocknumber >9999) then
            begin
               writeln ('error in clock number') ;
               errorflag := true ;
            end
         else
            begin
               writeln ('input employee name      ') ;
               readln  (employeename) ;
               writeln ('input shift worked, a or b  ') ;
               readln  (ashift, bshift) ;

               if (a) then
                  a:=10
               else if (b) then
                  b:=12 ;

               while shift = a,b do
                  begin
                     errorflag := false ;

                     if (shift <> a) or (shift <> b) then



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Surprise by the way how my PASCAL tutor check my assignment program - cw2c.pas (0/1)

2. Surprise by the way how my PASCAL tutor check my assignment program - cw2c.pas (1/1)

3. Pascal Programming Assignments

4. Help with Computer Science Assignment (Turbo Pascal)

5. Pascal assignment help please

6. I need help with Pascal assignment!!!

7. need help with pascal assignment

8. ! I need help with Turbo Pascal assignment !

9. Programming Problem Assignment Bank

10. Program Assignment Idea Bank

11. Need HELP FINISHING PROGRAM (posted program) PASCAL

12. Pascal Assignment

 

 
Powered by phpBB® Forum Software