Computers and Technology

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();
}
}
}

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 18:30, porkhappycom
Which number on the image above correctly indicates the name of a folder in this url? a.1b.2c.3d.4
Answers: 2
image
Computers and Technology, 22.06.2019 15:00, nika0001
When designing content as part of your content marketing strategy, what does the "think" stage represent in the "see, think, do, care" framework?
Answers: 3
image
Computers and Technology, 23.06.2019 20:00, shaheedbrown06
What software programs are used to to create professional publication? a.) graphics programs b.) word processors c.) page layout programs d.) spreadsheet programs
Answers: 2
image
Computers and Technology, 24.06.2019 07:00, erick7123
Why do we mark tlc plates with pencil and not with pen
Answers: 2
Do you know the correct answer?
Employee Class Write a class named Employee that has the following properties: Name--The Name proper...

Questions in other subjects:

Konu
Mathematics, 09.10.2020 06:01
Konu
History, 09.10.2020 06:01