Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using C# make these updates to the following code. *Update the Employee class* -

ID: 3712088 • Letter: U

Question

Using C# make these updates to the following code.

*Update the Employee class*

-Update a new field, telephone number

- Include error checking to match that a telephone number has been entered.

This will require a regex expression to look for the following patterns:

999-999-9999, 999 999-9999, (999) 999-9999, 999 999 9999

- If not found, throw an exception with the following string message Error:10 Phone number is not in the proper format

Then

Add two more properties, one for HealthPlan(0-None, 1-Single, 2-Married, 3-Family) and one for UnionMember (true/false).

Throw an exception if someone tries to set the field to some other integer number.  The string mesage will be Error: 30 Invalid HealthPlan code.

Set the default values in the constructor to _healthPlan = 0 and _unionMemb = false.

Explanation / Answer


then Error 2:
public static class StaticTest
{
static string stringToSet
{
get
{   
return stringToSet;
}
set
{
stringToSet = value;
}
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote