/ COEN 244 – Fall 2006
Assignment # 1

Due: September 26, 2006

The purpose of this assignment is allow you to work with classes and objects as well as other C++ subjects, such as I/O files. In specific, your solution must have two files: a .h file where class declaration is included, and a .cpp file where the class implementation and the main function of your program are included.

An employee in “Intel Trading Company” is identified with the following:

ID

NAME

TYPE (Boolean =True if type is full timer, =False if type is part timer)

TOTAL_SALARY

#_OF_HOURS_WORKED_PER_WEEK

RATE_PER_HOUR

Once an employee object is created, all attributes, except for the employee name, should be possible to modify. You must include all needed functions in the class to provide that. In addition to that, the class must include a default constructor, a function called Show_Employee_Info, which displays all the employees’ information, a function that returns the total salary of the employee per week, and a function called File_Report, which prints all the information of the employee to an output file called “Employee.txt”.

The total salary is calculated as follows:

If the employee type is a part timer then:

TOTAL_SALARY will be equal to

RATE_PER_HOUR * #_OF_HOURS_WORKED_PER_WEEK

If the employee is a full timer then:

TOTAL_SALARY = 500+ ( #_OF_HOURS_WORKED_PER_WEEK – 38 )* RATE_PER_HOUR

Note: 38 is the # of hours that the full timer should work and 500$ is the salary per week for the full timer. You must use constant attributes when applicable (for example, to represent the value of 38).

In the main function, create 4 Employee objects, and then print the information of all these objects to the output file, Employee.txt. Following that, you must modify the salary and the hourly rate of two of these employees (the modified values should be entered from the standard input; that is the keyboard). Following the modifications, you must print all the employees’ information again to the output file.

Deliverables:

1)  You must submit your program electronically at https://eas.encs.concordia.ca/eas/authentication.jsp. You will need to upload the following files: your .h file, your .cpp file, as well as the Employee.txt file (after running your program).

Note: A hardcopy is NOT required for this assignment.

Coen 244 – Fall 2006

Assignment # 1
Page 2 of 2