$30
CSCE 240 – Programming Assignment Four
Purpose – Implement two classes
Create a TaxId class that holds the nine-digit tax id in a private non-static
string data member, and a private static nine-character string that specifies how
the tax id is to be masked. The class will contain accessor and mutator functions
for the private data members. Read the comments in the supplied taxid.h header
file for more detailed requirements. Initial tests for the functionality of the
TaxId class have been provided in the attached testtaxid.cc source file. You are
encouraged to create more rigorous tests.
Create an Employee class that has the following private data members:
- a TaxId object holding the employee’s tax id
- a double holding the number of hours the employee works per week
- an integer denoting whether the employee is 1-salaried, 2-hourly, or
3-contract
The class will have accessor and mutator functions for the private data members.
Read the comments in the supplied employee.h header file fore more detailed
requirements. Initial tests for the functionality fo the Employee class have been
provided in the attached testemployee.cc source file. You are encouraged to
create more rigorous tests.
Specifications
- Add all code for the definition of the TaxId class to the attached taxid.h
header file.
- Include all of the necessary code for the TaxId class, including the
implementation all of the public member functions, in the attached taxid.cc
source file.
- Add all code for the definition of the Employee class to the attached
employee.h header file.
- Include all of the necessary code for the Employee class, including the
implementation all of the public member functions, in the attached employee.cc
source file.
- You will submit a zip file (only a zip file will be accepted) containing
taxid.h, taxid.cc, employee.h and employee.cc to the assignment in Blackboard.
- Source files must compile and run on a computer of the instructor’s choosing
in the Linux lab (see your course syllabus for additional details).
Grade Breakdown
Style taxid.h: 0.25 point
Style taxid.cc: 0.25 point
Style employee.h: 0.25 point
Style employee.cc: 0.25 point
Documentation: 1 point
Clean compilation of taxid.cc: 0.25 point
Clean compilation of employee.cc: 0.25 point
Clean compile/link with testtaxid.cc: 0.25 point
Clean compile/link with testemployee.cc: 0.25 point
TaxId class passes instructor’s modified testtaxid.cc tests: 4 points
Employee class passes instructor’s modified testemployee.cc tests: 3 points
The penalty for late program submissions is 10% per day, with no submission
accepted after 3 days.