1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <string>
using namespace std;
#include "BonusEmployee.h"
BonusEmployee::BonusEmployee():Employee()
{
bonus=0.0;
}
BonusEmployee::BonusEmployee(string fname, string lname, int id, Date bday, Date hday, double bpay, double extrapay): Employee(fname, lname, id, bday, hday, bpay)
{
}
double BonusEmployee::getBonus()
{
return bonus;
}
void BonusEmployee::readPayInfo()
{
double bpay = getBpay();
cin>>bpay>>bonus;
}
double BonusEmployee::getGpay()
{
return(getBpay()+bonus);
}
double BonusEmployee::computeTax()
{
double tax;
double Gpay=getGpay();
if(Gpay>=1000)
{
tax=Gpay * .20;
}
else if(Gpay>=800)
{
tax=Gpay*.18;
}
else if(Gpay>=600)
{
tax=Gpay*.15;
}
else
tax=Gpay*.10;
return tax;
}
void BonusEmployee::printPayInfo()
{
double gpay=getGpay(), bpay = getBpay();
cout<<endl<<bonus;
cout<<endl<<bpay;
cout<<endl<<"gpay:\t"<< gpay;
cout<<endl<<"tax:\t"<< computeTax();
cout<<endl<<"net pay:\t"<<(getGpay()-computeTax());
}
|
hey so here are the changes I made as for your recommendations, and here are my errors now ;/
Undefined first referenced
symbol in file
main /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/crt1.o
typeinfo for Employee /var/tmp//cc5C6Hyc.o
Employee::Employee() /var/tmp//cc5C6Hyc.o
Employee::Employee(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, Date, Date, double)/var/tmp//cc5C6Hyc.o
Employee::getBpay() /var/tmp//cc5C6Hyc.o
ld: fatal: symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
now im not getting syntax errors but unknown errors..