Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Department of Computing

College of Computing and Informatics


Semester 2, 2020/2021
CSEB334 Object-oriented Programming
Group Project

Create a class named Employee including a constructor and the necessary accessor and mutator
methods. The class should keep the following information in fields:
1. Employee Name
2. Employee Number in the format NNN-X, where each N is a digit and X is a letter
represents department, which can be one of the following:
· H - Human Resources
· A - Accounting
· P - Production
· S - Shipping
Example: 902-A = an employee from Accounting department
3. Hire Date

Next, write a class named ProductionWorker that inherits from the Employee class. Include a
constructor and the necessary accessor and mutator methods. The ProductionWorker class
should keep the following information in fields:
1. Shift Number which is an integer and can be one of the following:
1 - represents Morning Shift
2 - represents Swing Shift
3 - represents Night Shift
2. Hourly Pay Rate

You are required to write an application that reads input of employees information from a text file
(Information.txt) and decide from the employee number his/her department and the working shift
the employee is assigned. A list of the employees and their information should be displayed onto
console as well as written to a text file named Department.txt.

Input: The input file will be named Information.txt. One record (line) will contain the employee
name, employee number, hire date, shift number and pay rate each separated by spaces (a non-
production worker should be identified via zero number for the shift number). A sample text file is
below.
Susan 902-A 05/16/2009 1 16.25
Alex 823-S 06/21/2000 2 17.50
Ahmad 788-H 12/1/2003 0
Output: Output should consist of a listing of the employee name, employee number, employee's
department, hire date, shift name and pay rate This information should be displayed on the
screen as well as written to a text file named Department.txt in the format shown below:

Name Employee No Department Hire Date Shift Name Pay Rate


-------------------------------------------------------------------------------------------------------------------------------
Susan 902-A Accounting 05/16/2009 Morning Shift RM16.25
Alex 823-S Shipping 06/21/2000 Swing Shift RM17.50
Ahmad 788-H Human Resource 12/1/2003
Evaluation Criteria:
Evaluation criteria Marks
Program Correctness 10
Design and coding standards 10
Assignment specifications 10
Ability to describe most of the functions 10
TOTAL 40

Rubrics:
Criteria 8-10 5-8 1-4
1. Program correctness Program always Minor details of Significant
works the program details of
correctly and specification specification
meets the are violated, are violated, or
specifications program the program
functions often exhibits
incorrectly on incorrect
some inputs. behaviour.
2. Design and coding There may be There are some There are major
standards some minor moderate problems with
failures to violations of the the program's
adhere to standards design or
standards coding style
that would
interfere with its
comprehension,
reuse, or
maintenance
3. Assignment specifications Program meets Minor Significant
specifications specifications specifications
are violated ignored or
violated
4. Ability to describe most of All team Not all (2-3 Only 1-2
the functions members able members) members able
to explain the members able to explain the
program in to explain the program in
detail program in detail
detail

Peer Evaluation:

Evaluate your group members involvement in the project based on the following criteria:
Criteria
Contributes meaningfully to group discussions.
Completes tasks on time.
Prepares work in a quality manner.
Demonstrates a cooperative and supportive attitude.
Contributes significantly to the success of the project.

You might also like