cpp
// Employee.cpp : Defines the entry point for the console application.
// description: Employee
// programmer: Erin
// date: 09/03/2008#include <iostream>
using std::cout;
using std::endl;
class Employee
{
// data declaration section
private:
int ID; // declare ID as a integer variable
double RATE; // declare RATE as a double variable
int Employee1; // declare as obect
// methods declaration section
;public:
Employee(); // the constructor's declaration statement
void showEmployeeValues (); // this will be an accessor
void setNewEmployeeValues (int, double); // this will be a mutator
void displayEmployeeValues();
};
// methods implementaion section
Employee::Employee() // this is a constructor
{
ID = 99;
RATE = 99.99;
cout << "A new Employee object using the default constructor.\n;
}
void Employee::showEmployeeValues() // this is an accessor
{
cout << " ID = " << ID << "\n RATE = "<< RATE << endl;
}
void Employee::setNewEmployeeValues(int ID, double RATE) //this is a mutator
{
cout << Employee1.ID = 11 ;Employee1.double RATE = 11.11
cout << Employee2.ID = 22 ;Employee2.double RATE = 22.22
};
int main ()
{
Employee Employee1; // declare a variable of type Employee
cout << "The values for this Employee is: \n";
<< Employee1.showEmployeeValues (); // use a class method on this object
cout << "\nThe values for this Employee is: \n";
<< Employee2.showEmployeeValues (); // use another class method on this object
Employee1.setNewEmployeeValues (11,11.11); // call the mutator
Employee2.setNewEmployeeValues (22,22.22); // call the mutator
cout << "\nThe values for this Employee have been changed to:";
<< Employee1.showEmployeeValues();
<< "\nThe values of this Employee is: ";
<< Employee1.displayEmployeeValues();
<< Employee2.displayEmployeeValues()<< endl;
return 0;
}
This is my code but I am unable to compile without any errors.
My assignement was to :
1. The class requires two instance variables:
• An integer variable called ID to store the employee ID
• A double variable called RATE to store the employee hourly pay rate
2. The class requires a constructor that creates each employee object with the following default values:
• ID = 99
• RATE = 99.99
3. The class requires an Accessor method that returns the value stored in the ID instance variable.
4. The class requires an Accessor method that returns the value stored in the RATE instance variable.
5. The class requires a Mutator method that allows the user to set the value stored in the ID instance variable.
6. The class requires a Mutator method that allows the user to set the value stored in the RATE instance variable.
Part B: Create a main program to test the Employee class. The main program will do the following:
1A. Create an Employee object named Employee1.
1B. Create an Employee object named Employee2.
2A. Display the Employee1 value for ID
2B. Display the Employee1 value for RATE
3A. Display the Employee2 value for ID
3B. Display the Employee2 value for RATE
4A. Set the ID value for Employee1 to be 11
4B. Set the RATE value for Employee1 to be 11.11
5A. Set the ID value for Employee2 to be 22
5B. Set the RATE value for Employee2 to be 22.22
6A. Display the Employee1 value for ID
6B. Display the Employee1 value for RATE
7A. Display the Employee2 value for ID
7B. Display the Employee2 value for RATE
I honestly need help, I have tried everything to get this code to compile, and the program to display.
Appreciate all feedback.
Thanks
Mod Edit: Please use code tags when posting your code. Code tags are used like so =>

Thanks,
PsychoCoder