[SOLVED] COP2337C Project Version 1

25.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (2 votes)

For version 1 your job will be to create an Employee class.   Requirements:

  • (10 pts) An Employee should have the following fields:
    • First Name o Last Name
    • ID number, in the format AA-XXXX
    • Social Security Number, in the format XXX-XX-XXXX o Start Year o Department o Department code
  • (10 pts) Constructors:
    • Default constructor that initializes the data members to the following values:

Employee Name: John Doe

Start Year: 2017

  • Parameter Constructor that sets the following fields:

First Name, Last Name, Social Security Number, Start Year, Department, Department Code

  • (10 pts) Include mutator methods for the following fields:

First Name, Last Name, Social Security Number, Start Year, Department, Department Code

  • (10 pts) Include accessor methods for the following fields:

First Name, Last Name, ID number, Social Security Number, Start Year, Department, Department Code

  • (20 pts) Include the following private method called CreateIDNumber().

     The purpose of this method is to generate the ID number.

The ID number should be generated randomly, in the format AA-XXXX with the following rules:

  • The first letter should be generated from the first character of the first name
  • The second letter should be generated from the first character of the last name
  • The 4 digits should be generated randomly. For example: 

Employee Name: John Doe

ID number: JD-8232

Note: This method should be called from both constructors. 

  • (10 pts) Include a toString() You can decide the format of the string.
  • (10 pts) Create a UML diagram to represent your Employee class.
  • (20 pts) Create a driver class called EmployeeTester. Be sure to fully test your class.
Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.