Unix Error/Complications (Maybe syntax)

//Implementation file
//Implements the class Applicant member functions

#include "Applicant.h"

/* set name and get name*/
void Applicant::setName(string firstName, string lastName)
{
name = firstName + " " + lastName;
}
string Applicant::getName()
{
return name;
}
/* set hours and get hours*/
void Applicant::setHours (int newHours)
{
hours = newHours;
}
int Applicant::getHours()
{
return hours;
}
/*set deposit and get deposit*/
void Applicant::setDeposit(bool newDeposit)
{
deposit = newDeposit;
}
bool Applicant::getDeposit()
{
if (deposit == "Y")
return true;
else
return false;
}
/* Set and get payMonth*/
void Applicant::setPayMonth(int newPayMonth)
{
payMonth = newPayMonth;
}
int Applicant::getPayMonth()
{
return payMonth;
}
/* Set and get payDay*/
void Applicant::setPayDay(int newpayDay)
{
payDay = newpayDay;
}
int Applicant::getPayDay()
{
return payDay;
}
/* Set and get housing*/
void Applicant::setHousing(string newHousing)
{
housing = newHousing;
}
string Applicant::getHousing()
{
return housing;
}
/* Set and get sex*/
void Applicant::setSex(char newSex)
{
sex = newSex;
}
char Applicant::getSex()
{
return sex;

}
/* Add any necessary points to student's RSVP points*/
int Applicant::addPoints(int gpa)
{
int addpoints=0;
int crdhours=0;
if (gpa >= 3.80)
return addpoints+20;
else if (gpa >= 3.50)
return addpoints+18;
else if (gpa >= 3.20)
return addpoints+16;
else if (gpa >= 3.00)
return addpoints+14;
else if (gpa >= 2.80)
return addpoints+12;
else if (gpa >= 2.60)
return addpoints+10;
else if (gpa >= 2.40)
return addpoints+8;
else if (gpa >= 2.20)
return addpoints+6;
else if (gpa >= 2.00)
return addpoints+4;
else if (gpa >= 0.00)
return addpoints+2;
if (crdhours <= 29)
return crdhours+10;
else if (crdhours <= 59)
return crdhours+8;
else if (crdhours <= 59)
return crdhours+6;
else if (crdhours >= 90)
return crdhours+4;
points = addpoints+crdhours;
return points;
}
/* Deduct any points from student's RSVP points*/
int Applicant::deductPoints(int minuspoints)
{
int minuspoints;
int infractions;
minuspoints = 2 * infractions;
points = points - minuspoints;
return points;

}
/*Get the total points for the student*/
int Applicant::getPoints()
{
return points;
}
If you tell us what the error message is, we can tell you how to fix it.
Topic archived. No new replies allowed.