subject

Employee Class Write a class named Employee that has the following properties: Name--The Name property holds the employee's name. IdNumber--The IdNumber property holds the employee's ID number. Department--The Department property holds the name of the department in which the employee works. Position--The Position property holds the employee's job title. The class should have the following overloaded constructors: A constructor that accepts the following values as arguments and assigns them to the appropriate properties: employee's name, employee's ID number, department, and position. A constructor that accepts the following values as arguments and assigns them to the appropriate properties: employee's name, employee's ID number, department, and position properties should be assigned an empty string ("") A parameter-less constructor that assigns empty strings ("") to the Name, Department, and Position properties, and 0 to the IdNumber property. Computer programming language- C# VIsual Basic forms
my code:
using System;
using System. Collections. Generic;
using System. ComponentModel;
using System. Data;
using System. Drawing;
using System. Linq;
using System. Text;
using System. Threading. Tasks;
using System. Windows. Forms;
namespace Employee_Class
{
public partial class Form1 : Form
{
const int number = 3;
Employee[] Employeeinfo = new Employee[number];
public Form1()
{
InitializeComponent();
}
class Employee
{
const int number = 3;
Employee[] Employeeinfo = new Employee[number];
public string _Name;
public string _IdNumber;
public string _Department;
public string _Position;
public Employee(string Name, string IdNumber, string Department, string Position)
{
_Name = Name;
_IdNumber = IdNumber;
_Department = Department;
_Position = Position;
}
public string Name { get { return _Name; } set { _Name = value; } }
public string IdNumber {get { return _IdNumber; } set { _IdNumber = value; }}
public string Department{get { return _Department; }set { _Department = value; }}
public string Position{get { return _Position; }set { _Position = value; }}
}
private void Form1_Load(object sender, EventArgs e)
{
Employeeinfo[0] = new Employee("Susan Meyers", "47899", "Accounting", "Vice President");
Employeeinfo[1] = new Employee("Mark Jones", "39119", "IT", "Programmer");
Employeeinfo[2] = new Employee("Joy Rogers", "81774", "Manufacturing", "Enginner");
}
private void showButton_Click(object sender, EventArgs e)
{
employeeInfoShowLabel. Text = Employeeinfo[0]._Name;
}
private void exitButton_Click(object sender, EventArgs e)
{
this. Close();
}
}
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
Which option marks all modification made within a document? review comment track changes balloons
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
question
Computers and Technology, 23.06.2019 18:50
Ais a picture icon that is a direct link to a file or folder
Answers: 1
question
Computers and Technology, 24.06.2019 02:40
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
You know the right answer?
Employee Class Write a class named Employee that has the following properties: Name--The Name proper...
Questions
question
Mathematics, 21.09.2020 06:01
question
Social Studies, 21.09.2020 06:01
Questions on the website: 13722367