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

This is a C# console application assignment: Create a class called Employee that

ID: 670729 • Letter: T

Question

This is a C# console application assignment:

Create a class called Employee that includes one piece of information: name of the employee (type string). Do not create any instance variable. Instead, use auto-implemented property. Your class should have a constructor that initializes the name. Write a test application named EmployeeTest that demonstrates class Employee’s capabilities. Ask the user to enter the name for two employees and use them to create two Employee objects   Retrieve the names stored in the Employee objects and display them in the console window.

Explanation / Answer

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

namespace EmployeeTest
{
public class Employee
{
public String ename { get; set; }
  
public Employee(String en)
{
ename = en;

}
  
}
class Program
{
static void Main(string[] args)
{
Employee o = new Employee("AAA");
Console.WriteLine(o.ename);

}
}
}

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