Question: Create a C# program Add a new class called Employee in Emplovee.cs FIELDS Create the following fields firstname ( string ) lastname ( string )

Create a C# program
Add a new class called Employee in Emplovee.cs
FIELDS
Create the following fields
firstname(string)
lastname (string)
id (string)
age (integer)
address(string)
Phonenumber(string)
title(string)
yearlysalary(double)
employmentstatus(string)
CONSTRUCTORS
Create a constructor with no parameters (default constructor)
firstname will be set to "Unknown"
lastname will be set to "Unknown"
Id will be set to "Unknown"
, age will be set to 0
employmentstatus will be set to "active"
Create a constructor with 4 parameters-firstname, lastname, id and ase
Assign the parameters to the fields.
employmentstatus will be set to "active"
MEIHODS
Create the following methods
Intro()- This method will display firsthame, lasthame, id, age and expdovuentstatus of employee object (see cat example)
TESTING YOUR Class (hint Write code in main.cs)
Youshould test all these conditions and include screenshots.
Create an employee by calling the Constructor with no parameters.
call intro() method for this employee.
Create another employ Resistee object by calling the Constructor with parameters -firstname as "john" lastname as "smith", id as "1234" and age as 45.
Call intro() method for thls emplovee.
 Create a C# program Add a new class called Employee in

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!