All pastes #627990 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-07-20 17:17 UTC
rendered paste body
#include <iostream.h>

class Employee{
      public:
      int age(int);
      int serviceYears;
      float salary;
      float payRate(float);
}
int main() 
{
    int hoursworked;
    cout << "How many hours have you worked?" << endl;
    cout << "-------------------------------" << endl;
    cin >> hoursworked;
    Employee justin;
    justin.age(19);
    justin.serviceYears=3;
    justin.payRate(12.50);
    justin.salary = hoursworked * justin.payRate;
    cout << "-------------------------------" << endl;
    cout << "You worked ">> hoursworked << " at a Pay Rate of " << justin.payRate << " making " << justin.salary << endl;
}