Patricia

We have a quiz on Tuesday on programming/preface from book one and the web from book two.

The program we discussed last time was on page 15.

    a. what does it look like

Programming Opportunities:

"hit many birds with one stone"

"take the ball and run with it"

Programming is magic because it is a transfer of learning!

Do you know what the difference is between data and program?

The input file called data.in is used for telephone search programs

inaudible- impossible to hear  

All of the input files are called "data" and all the output data is considered "interaction"

File name: engotospa.in= English words and associated Spanish words

File name: bankbal.in is used for associated item program

File name: fruitpri.in consists of fruit names and their prices in the supermarket

Note: when the computer freezes we need to re-start and trouble shoot

Page 45: a program for building a payroll

       a. consists of three parts: input, process, output

        b. the tax rate at this time is a constant 20%

Today we will type, compile and run the program that we will type. (3 stages)

        a. run a program= execute a program

www.freshpatents.com- see "inventor" professor's patented paper on programming

Page 45 Program:

1. #include<iostream.h>

2.

3. main (){

4. int employeeid;

5. int hoursworked;

6. float hourlyrate, grosspay, taxamount, netpay;

7. float const TAXRATE= 0.20;

8.cout<<"ENTER THE EMPLOYEE ID:";

9. cin>>EMPLOYEEID;

10.  cout<<"ENTER THE HOURS WORKED:";

11. cin>>hoursworked;

12. cout<<"ENTER THE HOURLY RATE:";

13. cin>>hourlyrate

14 grosspay=hours worked*hourly rate;

15. taxamount=grosspay*taxrate;

16. net pay=gross pay-taxamount;

17. cout <<"EMPLOYEE ID ID "<<employeeid<<endl;

18. cout<<"THE HOURS WORKED ARE"<<hoursworked<<endl;

19. cout<<THE HOURLY RATE IS"<<hourlyrate<<endl;

20. cout<<"THE GROSSPAY IS"<<grosspay<<endl;

21. cout<<"THE TAXAMOUNT IS"<<taxamount<<endl;

22. cout<<"THE NETPAY IS"netpay<<endl;

23. return 0;

24. }//MAIN