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

This is in C#, using Visual Studio 2015. UlRl class tests tihe ee methods, and p

ID: 3674112 • Letter: T

Question

This is in C#, using Visual Studio 2015.

UlRl class tests tihe ee methods, and propertics defined in the Motar- way claas Create an mployee class. Items to inclade as data merabers are employee nunher, first name, last name, date of hire, job description department, and monthly salary. The class is often used tu display zn alphabetical listing of all employees. Include appropriate constructors and properties. Provide two instance nethods that return the ful! name The first should return first name, space iast name. Ihe second methud should return the name in a format that it could be used tor sorting last name, followed by a comma, space, and then first name). Override the Tostring: method to retuzn all data members. Create a second clasa to test your Erloyee class Redel nt ela#8 that could be usedby a 1 etail store. items to

Explanation / Answer

Employee info section:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EmployeeProgram
{
public class employee
{
private int employeeNumber;
private string name;
private string hiredate;
private int monthlySalary;
private string description;
private string department;

public employee(int employeeNumber, string name, string dateOfHire, int monthlySalary, string description, string department)
{

this.employeeNumber = 321;
this.name = "Alex";
this.hiredate = "01/02/15";
this.monthlySalary = 2500;
this.description = "Corporate grunt";
this.department = "Sales";
}

public int EmployeeNumber
{
get
{
return employeeNumber;
}
set
{
employeeNumber = value;
}
}

public string Name
{
get
{
return name;
}
set
{
name = value;
}
}

public string Hiredate
{
get
{
return hiredate;
}
set
{
hiredate = value;
}
}

public int MonthlySalary
{
get
{
return monthlySalary;
}
set
{
monthlySalary = value;
}
}
public string Department
{
get
{
return department;
}
set
{
department = value;
}
}
public string Description
{
get
{
return description;
}
set
{
description = value;
}
}

public override string ToString()
{
return "Employee ID: " + employeeNumber +
"Employee Name: " + name +
"Employee Hire Date: " + hiredate +
"Employee Monthly Salary: " + monthlySalary +
"Employee Description: " + description +
"Employee Department: " + department;
}

public void Print()
{
Console.WriteLine(this.ToString());
}
}

calling section

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